use Scalar::Util qw( looks_like_number ); my $s = 123.45; $s =~ s/\./,/ if looks_like_number($s);
Works even better than setlocale because you are surely starting with the number in string form if you don't know whether a column contains a number or not.
In reply to Re^3: Change decimal point temporarily
by ikegami
in thread Change decimal point temporarily
by lima1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |