http://qs321.pair.com?node_id=410985


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.
SUNADMN
USE PERL

Replies are listed 'Best First'.
Re^5: rename issues
by ikegami (Patriarch) 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??

      SUNADMN
      USE PERL
        Right after the closes