Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: A console output question

by demerphq (Chancellor)
on Jun 18, 2002 at 11:30 UTC ( [id://175342]=note: print w/replies, xml ) Need Help??


in reply to A console output question

I like to use the following:
use Tie::Cycle; tie my $spinner, 'Tie::Cycle', ["\r-","\r\\","\r|","\r//"]; my $spin_every=10; while (<>) { print $spinner unless $. % $spin_every; # yada-yada-yada }
The result is a spinning line. Excellent for indicating the program is still alive. The use of mod prevents the output fom happening so often that printing slows the script down noticibly.

Yves / DeMerphq
---
Writing a good benchmark isnt as easy as it might look.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-04-25 10:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found