in reply to Checking for data types
use Scalar::Util qw(looks_like_number); if (looks_like_number($foo)) { print "It could be a number.\n"; } else { print "It's just a string.\n"; }
Other solutions could involve regexes from Regexp::Common or coded by hand.
-sam
|
---|