Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Show count before data output

by broquaint (Abbot)
on Jun 23, 2003 at 12:46 UTC ( [id://268136]=note: print w/replies, xml ) Need Help??


in reply to Show count before data output

The lazy way would be to tie up STDOUT e.g
use IO::Scalar; tie *STDOUT, 'IO::Scalar' => \my $stdout; find( \&fetcher, "/directory" ); untie *STDOUT; print "\n\nTotal Count = $ct\n\n"; print $stdout;
Or you could change your code to build up the output then display the accumulated output after the total count. See. IO::Scalar for more info on the hack above.
HTH

_________
broquaint

Log In?
Username:
Password:

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

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

    No recent polls found