Thread Zahl formatieren (17 answers)
Opened by bianca at 2012-12-11 14:49

pq
 2012-12-11 15:21
#164122 #164122
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
hab ich alles schon probiert...

Code: (dl )
1
2
3
4
5
6
$ perl -MPOSIX=LC_NUMERIC,setlocale -E 'setlocale LC_NUMERIC,"de_DE"; printf "%.2f\n", 1'
1.00
$ perl -MPOSIX=LC_NUMERIC,setlocale -E 'setlocale LC_NUMERIC,"de"; printf "%.2f\n", 1'
1.00
$ perl -MPOSIX=LC_NUMERIC,setlocale -E 'setlocale LC_NUMERIC,""; printf "%.2f\n", 1'
1,00

Last edited: 2012-12-11 15:22:20 +0100 (CET)
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem

View full thread Zahl formatieren