Tag Archives: Detection

Check Variable Type is Integer in Perl

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.

Posted in Perl | Tagged , , , | Leave a comment