If by numeric, you means a string that represents a natural integer in the decimal numeration system which first digit is not a zero, it happens to be a string $s that is left unchanged by the
in reply to How to determine if something is numeric?
oops, I read you specif without reading the code. I came with the same solution as you.
print +($_+0 eq $_ ? ' ' : 'not '). "numeric: $_\n" for qw( 1 01
+ a01 -3 -01 .1 )
not numeric: 01
not numeric: a01
not numeric: -01
not numeric: .1