in reply to Checking whether a $var is a number

Unfortunately perl does not have any built-in functions to do just this. One way you could check it is by seeing if perl warns "... is not numeric ..." when you try to do something with a value:

# numeric -- returns true if arg. is numeric sub numeric { my $value = shift; my $result = 1; local $^W = 1; # turn warnings on if they aren't already. local $SIG{__WARN__} = sub { $result = 0 }; # if we get a warning make $result false $value += 0; return $result; }