sub rotate_line { my $interval = 1; # Sleep time between twirls my $tcount = 0; # For each tcount the line twirls one increment my @baton = ( '-', '\\', '|', '/' ); while ($interval) { $tcount++; print "$tcount\n"; print $baton[ $tcount % @baton ]; sleep $interval; } }