Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Text file filtering

by bwana147 (Pilgrim)
on Jun 27, 2002 at 11:40 UTC ( [id://177733]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Text file filtering

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://177733]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.