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


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

Ok so we have that done, but there is still an issue here as I can't open the $old_file to read as the rename is ran first, so with that said should I rework the code to rename after the files have been modified?

SUNADMN
USE PERL

Replies are listed 'Best First'.
Re^9: rename issues
by ikegami (Patriarch) on Nov 29, 2004 at 18:29 UTC

    The code starts with example_user_menu.htm and ends with only pnDiagram_user_main.htm. Isn't that what you want? No rename. No need for rename.

      That is correct so I have taken out the rename, but this creates two sets of file one set with the old name and one set that is modified with the new name and modified text. the end result I want is to have the files renamed than open those files and do the switch inside them and not have the old file there at all. I think I am confusing myself here maybe I need to do another subroutine what do you think??

      Thanks
      SUNADMN
      USE PERL
        this creates two sets of file one set with the old name

        uh, no, unless unlink failed for some reason??? unlink deletes. How can you be left with something you've deleted?