This isn't a problem with sleep so much as a problem with buffered output. Printing a single character isn't filling up your buffer.
Add this to the top, but inside, your while statement:
This forces a flush right away after every print statement.$| = 1;
Frank Wiles <frank@wiles.org>
http://www.wiles.org
In reply to Re: Twirling baton progress indicator in Perl
by ides
in thread Twirling baton progress indicator in Perl
by axl163
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |