If a string in Perl 5 passes looks_like_number, it might as well be a number. For instance,
my $s = \"10\" + 5;
results in $s
$s
DB<1> sub is_num { my $x = shift; "$x " ~~ $x } DB<2> print is_num(123) 1 DB<3> print is_num('123') DB<4>