IIUC, the headers stand on a line by themselves. Then, you might want to have a look at the flip-flop operator (..).
perldoc perlop
while ( <> ) { if ( /\(\+Header1\)/ .. /\(-Header1\)/ ) { # you're in part one } if ( /\(\+Header2\)/ .. /\(-Header2\)/ ) { # you're in part two } if ( /\(\+Header3\)/ .. /\(-Header3\)/ ) { # you're in part three } }
HTH
--bwana147
In reply to Re: Text file filtering
by bwana147
in thread Text file filtering
by surfmonkey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |