in reply to Move multiple files?
foreach my $fileFrom (@filesFrom){ move ($fileFrom, $fileTo) or die "$!"; }
Which will open the directory, and read it item by item, instead of performing a glob. This will also avoid an array in memory, and will not change your working directory.opendir SUBM, $curSubmitDir; while (defined (my $fileFrom = readdir DIR)){ move ($fileFrom, $fileTo) or die "$!"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Move multiple files?
by kelan (Deacon) on Oct 28, 2002 at 21:48 UTC |