Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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.

Thanks!

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2022-07-06 13:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?