in reply to Readdir against large number of files

Where's your state variable?

my $printing = 0; while (<UNMODIFIED>) { if ($printing) { print MODIFIED $_; next; } $printing++ if /STRUC20/; }

Also, you don't need the /bin/mv, just use unlink and rename.

Replies are listed 'Best First'.
Re^2: Readdir against large number of files
by Not_a_Number (Prior) on Oct 28, 2009 at 20:34 UTC

    Why the next?

      Because additional regular expression comparisons are pointless.