I have been searching for some sort of replacement for the sleep function but have not been successful. Any advice would be greatly appreciated.sub rotate_line { my $interval = 1; # Sleep time between twirls my $tcount = 0; # For each tcount the line twirls one incremen +t while ($interval) { $tcount++; print "$tcount\n"; switch ($tcount) { case 1 { printf '-'; sleep $interval; } case 2 { print "\\"; sleep $interval; } case 3 { print "|"; sleep $interval; } case 4 { print "/"; sleep $interval; } else { $tcount = 0; } } } }
In reply to Twirling baton progress indicator in Perl by axl163
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |