use strict; use FileHandle; use vars qw(@ISA @EXPORT $VERSION); use Exporter; $VERSION = 1.00; @ISA = qw(Exporter); @EXPORT = qw(print_total); sub print_total($$) { my $total = shift; my $label = shift; my $n; if ($total == 1) { STDOUT->autoflush; print $label; } $n = length($total); print "$total"; while ($n-- > 0) { print "\b"; } }