Posted on Wednesday, 7th January 2009 by Balazs
If you need to make sure that data incoming from a data source is integer, you can use:
if ( $variable =~ m/^[d]*$/ ) { print “integern”; }
More info is on SitePoint.
Share and Enjoy:
Tags: Detection, Integer, Perl, Type
Posted in Perl | Comments (Comments)