Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^4: rename issues

by sunadmn (Curate)
on Nov 29, 2004 at 18:08 UTC ( #410985=note: print w/ replies, xml ) Need Help??

in reply to Re^3: rename issues
in thread rename issues

Ok so the only thing I am missing here is that I do no want to make a backup of the old file all I want to do is rename the old to the new then open the new for writing and make the switches in the new file.


Comment on Re^4: rename issues
Replies are listed 'Best First'.
Re^5: rename issues
by ikegami (Pope) on Nov 29, 2004 at 18:11 UTC
    You don't want to keep the old file? Add unlink($old_file_name); at the end. You can't read from and write to the same file at the same time, so you have to do it at the end.
      This is going to sound stupid but hwere exactly should I place the unlink at??

      USE PERL
        Right after the closes

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2016-02-12 08:33 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (391 votes), past polls