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 ends
Yes, 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 rescue
Yes, 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.
  • Comment on Re^6: How to determine if an array contains an undef value?

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

    Hello Laurent_R,

    Thank you for your time and effort you examples are enlightening to me.

    Thank you for your time and effort.

    Seeking for Perl wisdom...on the process of learning...not there...yet!