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

Re: Trying to do multiple while loops on the same input file

by runrig (Abbot)
on Jun 01, 2011 at 15:14 UTC ( [id://907650]=note: print w/replies, xml ) Need Help??


in reply to Trying to do multiple while loops on the same input file

Why would having two loops cause the file handle position to be reset? I'd be upset if it did, because sometimes it makes sense to read a file in more than one loop and do something like:
while (<$fh>) { ..read/process file header last if /End-Of-Header/; } while (<$fh>) { ...read/process file body }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://907650]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-24 12:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found