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*
In reply to Re: Show count before data output
by particle
in thread Show count before data output
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |