package popchar; use strict; sub new { bless { chars => [qw( | / - | - \ )] },$_[0]; } sub pc { $_[0]->{char} = shift(@{$_[0]->{chars}}); push(@{$_[0]->{chars}},$_[0]->{char}); return($_[0]->{char}); } 1; #### #!/usr/bin/perl -w use strict; $|=1; use popchar; my($pch) = popchar->new; while(1) { print "\rLoading ".$pch->pc(); }