my $line = '123,456,789'; my ($val) = split(',' , $line); # $val is the string '123' $val += 2; # $val is now the integer 125 $val /= 2; # $val is now the float 62.5 print "I ended up with $val" # $val is treated as the string '62.5'