Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: undef == 0?by Fletch (Bishop) |
on Oct 24, 2007 at 16:25 UTC ( [id://646927]=note: print w/replies, xml ) | Need Help?? |
Since the undefined value in a numeric context is treated as 0 why should it? Granted it may be surprising coming from different context (say Ruby where nil is not equal to anything but itself), but by the way undef is defined in Perl that's just the way it is. But if you're using warnings you will get whinged at for doing so.
In Section
Seekers of Perl Wisdom
|
|