Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re^4: Rename the text file WRT String

by Monk::Thomas (Pilgrim)
on Jul 24, 2013 at 10:45 UTC ( #1046063=note: print w/replies, xml ) Need Help??

in reply to Re^3: Rename the text file WRT String
in thread Rename the text file WRT String

a) I failed to recognize it wasn't the OP who posted this code. Ahem. Oops.

b) I'm aware that rename has portability issues, but in this case it's pretty safe to use it because the requirements specify the rename must happen to a file and the file name changes, but not the location. Since we closed the filehandle before, the 'open file' issue does not apply either. Other issues may apply, but this is the OPs responsibility to figure out since we do not know the environment and requirements.

c) nitpick: Your manual rename didn't since there was no unlinking of the old file. I'm sorry to say that but it was just a very inefficient copy, which may even silently generate garbage output in case the disk space gets exhausted while copying. (The OP didn't give any clue how large the files are.)

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2016-09-25 01:58 GMT
Find Nodes?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:

    Results (463 votes). Check out past polls.