|
|
>>>>> ""Andrew" == "Andrew Curry" <andrew.curry@xxxxxxxxxxxx> writes:
"Andrew> If you are not 100% sure then you can also do if ($x =~/^\d*$/) for an
"Andrew> actual integer i.e. a number in the positive whole set of numbers {
"Andrew> 1,2,3....} or negative whole numbers -1,-2,-3.... or 0.
This also fails, declaring "123\n" as a match, and thus being
"an integer". False positive.
Please check your answers before answering on beginners next time.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@xxxxxxxxxxxxxx> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
|
|