Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re^4: Rename the text file WRT String

by Monk::Thomas (Friar)
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2017-10-22 15:18 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (273 votes). Check out past polls.