Is there a simple way in Perl that will allow me to determine if a given variable is numeric? Something along the lines of:
if (is_number($x)) { ... }
You can use Regular Expressions to determine if $foo is a number (or not).
Take a look here: How do I determine whether a scalar is a number