in reply to stripping "." from amounts

Checkout printf and sprintf:
my @data = qw/ 1 1.01 2.49 3.48999 3.5001 /; printf "%s => %0.2f\n", $_, $_ for @data;

my @data = qw/ 1 1.01 2.49 3.48999 3.5001 90 90.0 90.00 90.01 /; #use %d instead of %0.0f if you don't want rounding printf "%s => %0.0f\n", $_, $_ for @data;
As to your code, . in a regex matches any one character, see perlre and perlretut. You need to escape it: /\./

update: misread the question. Code updated