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

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.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (14)
As of 2016-06-27 19:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (342 votes). Check out past polls.