in reply to A whirleygig for a progress indicator for scripts
Then you don't have to bother with split and all that.my @whirley = map chr, qw/32 176 177 178 219 178 177 176/;
Also, the whirley function could use some work (particularly since it gives a warning):
The most important change here is the return line. You were taking an array slice:sub whirley { $WHIRLEY_COUNT = 0 if ++$WHIRLEY_COUNT == @whirley; return $whirley[$WHIRLEY_COUNT]; }
which isn't what you want to do; you just want a single element (and you don't need the quotes):return "@whirley[$WHIRLEY_COUNT]";
return $whirley[$WHIRLEY_COUNT];
|
---|
Replies are listed 'Best First'. | |
---|---|
RE: RE: A whirleygig for a progress indicator for scripts
by da w00t (Sexton) on Mar 22, 2000 at 21:43 UTC |