use strict; use warnings; while (<DATA>) { s/(\.(\d+))(?=.*,)/$2/g; s/(\d+),?(\d*)/print((($1.'.'.$2)*2),"\n")/eg; } __DATA__ 1,2 1.23,456 1.23.456,789 STDOUT: 2.4 246.912 246913.578
In reply to Re: locale savvy comma as decimal operator
by sh1tn
in thread locale savvy comma as decimal operator
by tphyahoo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |