Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: making a spinner

by blakem (Monsignor)
on Sep 20, 2001 at 22:40 UTC ( #113666=note: print w/replies, xml ) Need Help??


in reply to making a spinner

This seems to work on my unix VT100 terminal. It involves unbuffering the output, and printing the '\b' or backspace char.
#!/usr/bin/perl -wT use strict; $| = 1; # unbuffer output my $spinner; my @spinState = ("-", "\\", "|", "/"); print "Working: "; foreach(1..25) { print "$spinState[$_%@spinState]"; sleep 1; print "\b"; # backspace }

-Blake

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2022-05-22 10:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (80 votes). Check out past polls.

    Notices?