http://www.perlmonks.org?node_id=183325


in reply to Integer Type Checking

Perl doesn't differentiate, AFAIK, between strings and integers as far as the programmer is concerned.

One way to tell if it's an integer would be:

print "Integer!" if $VAR =~ /^\d+$/;.