my $pm = new ProgressMeter(-items => scalar @list); $pm->start; my $c; for my $item (@list) { $pm->update(++$c); } $pm->finish;