in reply to Re^2: Can't modify private array in concatenation?
in thread Can't modify private array in concatenation?

Well, with a million or two you'd almost have to do something like this instead...

opendir my $dir, "." or die $!; while( my $name = readdir $dir ) { next unless $name =~ m/(?:XYZ|\.txt|\w)/; print "doing something on $name\n"; # more code here } closedir $dir;

-Paul

Replies are listed 'Best First'.
Re^4: Can't modify private array in concatenation?
by sgt (Deacon) on Dec 23, 2006 at 15:16 UTC

    or start thinking directory {of directories}+ ;) the directory entry will be about 20-40M, reading it is still OK, the real fun is when you have to rename/move a few files

    cheers --stephan