in reply to Re^5: How to determine if an array contains an undef value?
in thread How to determine if an array contains an undef value?
If $val is undef the loop endsYes, right (++), although there are many cases where you know this can't happen. But you are absolutely correct, $val may also be "0" or "", and that is more common. This syntax is broken or at best very dangerous. Which is the reason, BTW, why I would rather use the syntax of first example above, which does not have this problem. I've just corrected my post to strike out this example. Thanks for calling my attention on this.
Comma to the rescueYes, thanks, I know you can do that, I was just trying to give an example of a stupid mistake I did 4 or 5 years ago when trying to be too clever.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: How to determine if an array contains an undef value?
by thanos1983 (Parson) on Jan 06, 2015 at 14:59 UTC |