good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
•Re: Re: Re: Is it a number?by merlyn (Sage) |
on Oct 23, 2003 at 14:50 UTC ( [id://301599]=note: print w/replies, xml ) | Need Help?? |
Yeah, the difference is the difference between "could this string be converted into a number without getting the warnings if -w is on?" vs "is this value always and only a number?". Everything in the latter case is also true for the former, but the inverse is not true. For example, all external data read from filehandles is always a string initially, so it could never pass this "is_numeric" test.
-- Randal L. Schwartz, Perl hacker
In Section
Cool Uses for Perl
|
|