On 03/04/2008 03:41:44 PM, yitzle wrote:

-> I'd use a RegEx and test to see if the string is made up entirely of
-> integers.
->   print "The variable containing $p is an interger\n" if ($p =~
-> /^[0-9]+$/);

yitzle would seem to have the most foolproof solution. The only problem would be if $p="+1" which i would consider +1 an integer.

incidentally /^\d+$/ amounts to the same thing.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to