in reply to When does '123' become the number 123.0?

You really don't need to care if perl stores your numbers as strings or numbers. Perl will convert as necessary and it all just works!

Consider:

my $str = '123'; $str += 10; print "str = /$str/\n"; my $num = 456; $num =~ s/6/8/; print "num = /$num/\n";

Output:

str = /133/ num = /458/


Unless I state otherwise, all my code runs with strict and warnings