How To Determine If A String Is An Integer In Perl

This solution is hyper-simplistic, and does not deal with decimals or real numbers (those with either a – or a + in front of them)…
1 2 3 4 5 |
if ($value =~ /^\d+$/) { ## $value is an integer } else { ## $value is NOT an integer } |