Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: making a spinner

by archen (Pilgrim)
on Sep 20, 2001 at 23:17 UTC ( #113680=note: print w/replies, xml ) Need Help??

in reply to making a spinner

yeah, \b seems to work (okay, I feel stupid now). I could have sworn there was something about it not working in an MSDOS prompt. Perhaps I confused myself recalling not being able to check input as it happens in DOS.


Here's what the revised code looks like:

... print "Working: " . $spinState[$spinner]; while(read(INFILE, $buffer, 1024)) { print CRYPTFILE $cipher->crypt($buffer); &status() if(($wrap = ($wrap + 1) % 50) && not $silent); } print CRYPTFILE $cipher->finish; #-- flush remaining crap in buffe +r ... sub status() { $spinner = ($spinner + 1) % 4; print "\b$spinState[$spinner]"; }

Replies are listed 'Best First'.
Spinning Apple Pirate Prompt
by boo_radley (Parson) on Sep 20, 2001 at 23:31 UTC
    there's a variety of ascii/ escape codes that you can also use, if you're so inclined.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2022-05-29 12:56 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (101 votes). Check out past polls.