in reply to Where's the leak?

Thanks to all for a lot of invaluable knowledge.

In the end, I applied a variation on dws' sliding window technique in "Match in Huge Files." It's proven to completely eliminate the memory usage issue.

The solution (a.k.a. 'The Way Tekkie Did It'):

The addition of the following search subroutine:
sub search { my ($file, $searchString) = @_; local *F; open(F, "<", $file) or return 0; binmode(F); my $nbytes = read(F, my $window, 2 * BLOCKSIZE); while ( $nbytes > 0 ) { if ( $window =~ m/$searchString/ ) { close(F); return 1; } $nbytes = read(F, my $block, BLOCKSIZE); last if $nbytes == 0; substr($window, 0, BLOCKSIZE) = ''; $window .= $block; } close(F); return 0; }

Coupled with a modification to the main loop here:
if(search($file, $searchString)) { print "\tFound: $file\n"; foreach(@dir) { if(/^.*?\s+([A-Z]{1}$numSet\.\S{3})$/) { my $found = join('\\', ($dirPath, $1)); print "\tFound: $found\n"; } } }
And you've got another problem solved by the wisdom of the monks.
Many thanks once more to all who offered their assistance.