From 598ca46506b4d1552544852b788af7928aa35225 Mon Sep 17 00:00:00 2001 From: "Bradley M. Kuhn" Date: Sun, 21 Nov 2010 12:13:02 -0500 Subject: [PATCH] Better output, configured some based on CLI option of $COUNT_ONLY --- remove-spam-high-confidence-maildir.plx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/remove-spam-high-confidence-maildir.plx b/remove-spam-high-confidence-maildir.plx index e2e94b1..a21785d 100644 --- a/remove-spam-high-confidence-maildir.plx +++ b/remove-spam-high-confidence-maildir.plx @@ -78,8 +78,12 @@ MAIL: foreach my $dir (@msgDirs) { 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: