That will only work if the first zero to occur is exactly where the comma should go:
$ perl -e '$num=10; $num =~ s/0/\,0/; print $num,"\n";'
1,0
$ perl -e '$num=25500; $num =~ s/0/\,0/; print $num,"\n";'
255,00
$ perl -e '$num=250000000; $num =~ s/0/\,0/; print $num,"\n";'
25,0000000
| [reply] |