Andrew has got a good point. The perldoc page says:
   if (/^\d+$/) { print "is a whole number\n" }
which would indicate that the author of the perldoc page believes
"123\n" should classify as a number, while "123foo" shouldn't, even
though Perl sometimes treats "123foo" as a number.
I was going to write that I think it makes sense to consider "123\n" a
number and "123foo" not a number, but I suppose it does depend on each
person's situation, definition and requirements. I guess that makes
the perldoc page somewhat ambiguous.

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


Reply via email to