Better output, configured some based on CLI option of $COUNT_ONLY

This commit is contained in:
Bradley M. Kuhn 2010-11-21 12:13:02 -05:00
parent 074f2979e8
commit 598ca46506

View file

@ -78,8 +78,12 @@ MAIL: foreach my $dir (@msgDirs) {
close MAILDIR; close MAILDIR;
} }
print "$countDeleted of $total were deleted\n"; my $percent = ($countDeleted / $total) * 100.00;
print sprintf("%2f", $percent), " ($countDeleted/$total) ",
(defined $COUNT_ONLY and $COUNT_ONLY ? " would be deleted.\n" :
sprintf("were deleted.\nThis leaves %d in the folder.\n",
$total - $countDeleted));
############################################################################### ###############################################################################
# #
# Local variables: # Local variables: