Actually rename function call in perl can not span across the drives.
Wanted to know is there any solution for this.

Not necessary the fastest way, but this should work for most situations:

        sub copy
   {
                local $\;
                local $/;

print STDERR "copy $_[0] -> $_[1]\n" if $verbose;

                open my $src, '<', $_[0] or die "$_[0]: $!";
                open my $dst, '>', $_[1] or die "$_[1]: $!";

                # caller gets back the result of printing to
                # the destination file handle, which is a
                # reasonably way to check for roadkill on
                # the output.

                print $dst scalar <$src>
   }

...

copy qw( /foo/bletch /bar/bletch );


For really large stuff use Uri's "slurp" module (which uses lower-level functions to perform the writes).

--
Steven Lembark                               2930 W. Palmer
Workhorse Computing                       Chicago, IL 60647
                                           +1 888 359 3508

Reply via email to