Next | Trivial Utilities | 70 |
There's one other feature of sortby that I think is nice
my $N = my @old_order = sort {$a <=> $b} MH::message_list($FOLDER);
my $s = "s" unless $N == 1;
$VSCALE *= 3 until $N / $VSCALE < 80;
print STDERR "Scanned folder ($N message$s)\n" if $VERBOSE;
print STDERR '|', '-' x ceil($N/$VSCALE - 2), "|\n" if $VERBOSE;
for my $mn (@old_order) {
my $msg = MH::header($mn, $FOLDER);
$field{$mn} = $msg->get($FIELD);
print STDERR "." if $VERBOSE && $Vcounter++ % $VSCALE == 0;
}
print STDERR "\nRead messages\n" if $VERBOSE;
It's a progress meter
I don't like progress meters that fall off the right margin
This one adjusts the scale so that that never happens
If the meter exceeds 79 columns, it gets shrunk by a factor of 3
Next | Menu | Copyright © 2012 M. J. Dominus |