Possible Duplicate:
How do I tell if a variable has a numeric value in Perl?
I want to decide if a variable (value parsed from a string) is a number or not. How can I do that? Well, I guess /^[0-9]+$/ would work, but is there a more elegant version?
taken from here: http://rosettacode.org/wiki/Determine_if_a_string_is_numeric#Perl