in reply to Stupid parsing question

my $printing = 0; while( <DATA> ) { if( /indicator/ ) { $printing = !$printing; next; # presuming you don't want to print the indicator itself } print if $printing; } __DATA__ foo bar indicator baz quux fnord indicator flig? boink

Replies are listed 'Best First'.
Re: Re: Stupid parsing question
by dew (Novice) on Nov 27, 2001 at 23:31 UTC
    This is gonna work in another place. Thanks a lot.