http://www.perlmonks.org?node_id=852594


in reply to Change decimal point temporarily

You can use the substitute command to do this.If you want to replace the . for only numerals.Before replacing,you can check whether that variable has numerals or not by using regular expression in substitute command as follows.

$no=123.45; $no=~s/^(\d+)\.(\d+)/$1,$2/;