laziness, impatience, and hubris | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Thx!²
But > Consider the relative difficulty of fixing your problem case vs. my counter-factual problem case: while( $x = shift @a ) { # Fixed this is not a fix because while stops, if any element of @a is false.
Thats the old semipredicate problem, which can only be solved with list-assignments.¹ But I agree with you that it's most probably too late to fix that design decision...
Cheers Rolf ( addicted to the Perl Programming Language) ¹) for completeness: no defined doesn't help here, if undef is a legal value.
updates
²) best answer so far In reply to Re^2: shift in list context buggy? (best answer so far!)
by LanX
|
|