in reply to Stupid parsing question

For the benefit of others that may want a solution to the problem you initially state, consider using the bi-stable/flip-flop operator:
while ($looping) { do_something if condition_one .. condition_two; }
Example:
while (<DATA>) { print if /two/ .. /four/; } __DATA__ line one line two line three line four line five
This would print out lines 2, 3 and 4.

See perlop.

Replies are listed 'Best First'.
Re: Re: Stupid parsing question
by rje (Deacon) on Nov 27, 2001 at 22:29 UTC
    This is really cool! That snippet just made my
    visit worthwhile for the entire week!