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

Re^4: Rename the text file WRT String

by Monk::Thomas (Beadle)
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.)


Comment on Re^4: Rename the text file WRT String

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2014-07-13 05:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (246 votes), past polls