in reply to How to determine a variable value is a number
It will do something for every item that contains only digits. The ^ marks the start and $ marks the end of the string, telling the regex that you want it to match only if every character can be matched. Hope this helps.if ($item =~ /^\d+$/) { # do something }
elusion : http://matt.diephouse.com
|
|---|