The following may not exactly correspond to what you mean by 'numeric' but it will serve as an example of what the Scalar::Util module can do.
#!/usr/bin/perl
use warnings;
use strict;
use Scalar::Util qw(looks_like_number);
while (my $teststring = <DATA>){
chomp $teststring;#Remove newline character from end of string
if (looks_like_number($teststring)){
print $teststring, ' looks like a number to me', "\n";
}
else{
print $teststring, ' does NOT look like a number to me', "\n";
}
}
__DATA__
hello
5
2.3
-2.3
7t7