Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Show count before data output

by particle (Vicar)
on Jun 23, 2003 at 12:44 UTC ( [id://268134]=note: print w/replies, xml ) Need Help??


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*

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://268134]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-19 20:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found