sub run_with_progress { use Smart::Comments; ### Starting ... my ($cmd, $skip) = @_; die q{Nothing to run!} unless $cmd; $skip ||= 25; # Arbitrary my @sails = map { ($_) x $skip } qw{- \ | /}; my $sail = 0; for (0 .. 1000) { ### Running: $sails[$sail++ % @sails] system $cmd and die qq{'$cmd' failed! $? : $!}; } ### Finished. no Smart::Comments; return; }