http://qs321.pair.com?node_id=255195

nedals has asked for the wisdom of the Perl Monks concerning the following question:

$var = 1234;
$var = "1234";
Is there a function/test in Perl that can tell the difference between the above number or string?

I tried this but the answer is always numeric.
use POSIX;
print isdigit($var) ? "numeric\n" : "string\n";