in reply to Show count before data output

it looks like you need to put your data into memory when you find it, then print it later. right now, you print it inside the fetcher subroutine, where it's impossible to have a final count also. try something like:

## ... my @file_data; sub fetcher { ## ... while ... for ... { ## ... push @file_data, $i; $ct++; } } ## print here...

~Particle *accelerates*