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)) { ... }
A simple (and maybe simplistic) answer to the question is the content of $x numeric is the following:
$x
if ($x eq $x+0) { .... }
It does a textual comparison of the original $x with the $x converted to a numeric value.