Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: Find and Replace multiple values in a file.

by elef (Friar)
on Feb 08, 2011 at 13:28 UTC ( #886960=note: print w/ replies, xml ) Need Help??

in reply to Find and Replace multiple values in a file.

I'm no expert, but I'm pretty sure the commands in a normal perl script are executed sequentially. I.e. it's not possible for a command to start executing before the previous one completed, not without threading.
Try closing the OUT filehandle before you open the same file with a different handle. In my experience, perl will often only write (some of) the changes to disk when the filehandle is closed.
So, remove all those sleeps and go

# ... close IN; close OUT; open (IN2, "+<_G203.xml"); # etc.

Comment on Re: Find and Replace multiple values in a file.
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2015-11-29 12:11 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (750 votes), past polls