Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: redo entire loop

by Anonymous Monk
on Aug 13, 2010 at 15:02 UTC ( [id://854925]=note: print w/replies, xml ) Need Help??


in reply to redo entire loop

It doesn't sound like you want to redo the same thing as the first pass... It sounds like you want to do a second pass of the file while doing everything differently.

I suggest extracting the common logic fragment (inspecting the line) into a subroutine.

However, if your files aren't too big, you could simply modify the records in memory, then write it out only if you made changes.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-18 03:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found