in reply to Unix command working with Perl

Is there any reason why you can't use rename? You should be able to use that for moving files.

--t. alex

"Nyahhh (munch, munch) What's up, Doc?" --Bugs Bunny

Replies are listed 'Best First'.
Re: Re: Unix command working with Perl
by rob_au (Abbot) on May 31, 2002 at 13:48 UTC
    I would generally recommend the usage of the move method of File::Copy over that of the internal perlfunc:rename function. This is due to the limitations of the internal perlfunc:rename function with regard to copying across file systems and other platform specific anomalies such as the handling of open files - This is documented in both the perlfunc:rename and perlport man page.

     

Re: Re: Unix command working with Perl
by IlyaM (Parson) on May 31, 2002 at 13:54 UTC
    Is there any reason why you can't use rename?

    Moving files across filesystem boundaries? It doesn't work with rename.

    I always use File::Copy instead of rename for this reason.

    use File::Copy; move('/old/path', '/new/path') or die "Can't move: $!";

    --
    Ilya Martynov (http://martynov.org/)