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.