in reply to Rename problem

Perhaps the rename failed. But you never know if you don't check the return value of rename.

Abigail

Replies are listed 'Best First'.
Re: Re: Rename problem
by Anonymous Monk on Nov 22, 2002 at 17:34 UTC
    Thanks Abigail-II, I actually changed the line but no change in filename or error reported.
    Is there another way to check the return value
      What "another way"? You used no way....

      A typical way is:

      rename ($old, $new) or die "Failed to rename $old to $new: $!\n";

      Abigail

        Abigail, How can it be failing if there is a new file name created. It is just the wrong name.