in reply to Re^2: Progress Bar in Perl script
in thread Progress Bar in Perl script

So you can use the Term::Spinner module. It can be easily done manually, too:
$|=1; #autoflush sub spin { my @spinners = qw{/ - \ |}; my $index = $_[0]; print $spinners[$index]."\033[1D"; # man console_codes, ECMA-48 CSI se +quences, "CUB" return $index == 3 ? 0 : $index++; } my $j=0; for (something) { do_something; $j=&spin($j); }
Sorry if my advice was wrong.

Replies are listed 'Best First'.
Re^4: Progress Bar in Perl script
by slayedbylucifer (Scribe) on Jul 09, 2012 at 07:59 UTC
    No, Your advice was not wrong. I think I am looking for something similar. I will definitely try out your suggestion. Thanks for your time.