note
jethro
<c>
perl -e 'while ($s=<*>) { print $s,"\n"; sleep 5 }'
</c>
<p>As you can see a glob can read filenames one file at a time (hopefully perl really buffers the filenames in the background and doesn't read them in all at once). You might change it to something like this:</p>
<c>
use strict;
use warnings;
my @files;
my $filecount=0;
while (my $s=<*>) {
push @files, $s;
if (++$filecount>=100) {
DoTheMoveWith(@files);
$filecount=0;
}
}
DoTheMoveWith(@files) if (@files);
</c>
749359
749359