#! /usr/bin/perl use strict; use Term::ProgressBar; my $low = 1; my $high = 20; my $status = Term::ProgressBar->new( { name => 'Progress', count => $high - $low + 1, term_width => 80, }); my $count = 0; for my $no ( $low .. $high ){ # # calc prime # sleep 1; $status->update(++$count); }