in reply to undef == 0?
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: undef == 0?
by stu42j (Sexton) on Oct 24, 2007 at 16:39 UTC | |
by Fletch (Bishop) on Oct 24, 2007 at 16:51 UTC | |
by stu42j (Sexton) on Oct 24, 2007 at 17:36 UTC |