come trasformo un numero tipo 40000 in 40.000?
come trasformo un numero tipo 40000 in 40.000?
sub separa {
my $num = shift;
my $text = reverse $num;
$text =~ s/(\d\d\d)(?=\d)(?!\d*\,)/$1\./g;
return scalar reverse $text;
}
$numero = &separa(40000);
Marco Allegretti
shishii@tiscalinet.it
Lang: PERL, PHP, SQL.
Linux user n° 268623 Fedora Core 10, Fedora Core 6, Debian Sarge on mips