$| = 1; # autoflush required while (<$fh>) { spinner if !($. % 100); # process line }
{ my @spin = qw(- \\ | /); my $time = time; sub spinner { if ($time != time) { ++$time; my $spin = shift @spin; print STDOUT "\r$spin"; push @spin, $spin; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: spinner to keep the patiently waiting user patient
by jweed (Chaplain) on Dec 08, 2003 at 05:08 UTC | |
|
Re: spinner to keep the patiently waiting user patient
by atcroft (Abbot) on Dec 08, 2003 at 04:05 UTC | |
|
Re: spinner to keep the patiently waiting user patient
by RMGir (Prior) on Dec 08, 2003 at 17:17 UTC | |
by ysth (Canon) on Dec 08, 2003 at 18:12 UTC | |
by RMGir (Prior) on Dec 08, 2003 at 19:26 UTC | |
by rob_au (Abbot) on Dec 08, 2003 at 22:05 UTC | |
by Aristotle (Chancellor) on Dec 09, 2003 at 12:40 UTC |