http://www.perlmonks.org?node_id=113666


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