in reply to copy large number files in different dir's

i don't understand your code example, but i'm guessing:
use File::Copy; my @paths = ( [qw(/dir1/file /dir2)], [qw(/dir3/file /dir4)], ... ); for (@paths) { my ($from,$to) = @$_; copy($from,$to) or die $!; }
is that what you want?

Replies are listed 'Best First'.
Re^2: copy large number files in different dir's
by Anonymous Monk on Jun 17, 2004 at 15:44 UTC
    yes, that would work, but it would mean having to change the $from for eac directory. Could i have list of directories and pipe that list into the script?
      The only thing you would need to change is the @paths = () list of directories in the script, not the loop which grabs $from, $to pairs from that list. You could acquire the @paths list from anywhere that provides a list: slurp a file, read from STDIN, etc.

      --
      [ e d @ h a l l e y . c c ]