"be consistent" | |
PerlMonks |
Re^2: Iteration condition...by kyle (Abbot) |
on Mar 31, 2008 at 15:10 UTC ( [id://677558]=note: print w/replies, xml ) | Need Help?? |
The trouble with using the flip flop directly is that it's still true when /$Finish/ matches, but the OP wants $State to be false when /$Finish/ matches. To account for this, my solution says ( ( /$Start/ .. /$Finish/ ) && ! /$Finish/ ). The inner parentheses are necessary because && binds tighter than the flip flop. Without them, it means ( /$Start/ .. ( /$Finish/ && ! /$Finish/ ) ), which is true at /$Start/ and then never turns false.
In Section
Seekers of Perl Wisdom
|
|