I use the following code. It relies on Perl itself to decide if a string is a number or not. If Perl thinks it's a number, then it returns 1, otherwise zero. Works for big ints too (returns 1 for a big int).
sub isNumber
{
defined $_[0] or return 0;
my $R = 1;
local $SIG{__WARN__} = sub { $R = 0; };
return ($_[0] < 0) ? $R : $R;
}