superfrink has asked for the wisdom of the Perl Monks concerning the following question:
The output is:#!/usr/bin/perl -w use strict; use Email::Delete qw(delete_message); my @subject_list = ( '^Delivery Status Notification.*$' , '^Undelivered Mail Returned to Sender$' , '^failure notice$' , '^DELIVERY FAILURE.*$' , '^Undeliverable:.*$' , '^Returned mail: see transcript for deta.*' , ); foreach my $subject (@subject_list) { print $subject , "\n"; delete_message from => '/home/chad/Mailbox', matching => sub { my $message = shift; $message->header('Subject') =~ m/$subject/; }; }
Any idea why the program is hanging? top shows the process using next to no CPU time and very little memory.$ perl remove-bounce-emails.pl ^Delivery Status Notification.*$ ^Undelivered Mail Returned to Sender$ ^failure notice$ $ perl remove-bounce-emails.pl ^Delivery Status Notification.*$ ^Undelivered Mail Returned to Sender$
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Email::Delete trouble.
by Krambambuli (Curate) on Oct 25, 2007 at 20:42 UTC | |
|
Re: Email::Delete trouble.
by superfrink (Curate) on Oct 25, 2007 at 19:24 UTC |