GaijinPunch has asked for the wisdom of the Perl Monks concerning the following question:
As I have a few hundred messages on the server at any time, this seems to be a pretty massive waste of resources (it runs several times an hour). Is there any way w/ Net::POP3 to keep it open, and just have it listen like a socket so I can just let the script run like a daemon?my $pop = Net::POP3->new( $server, Debug => 0 ) || die $!; if ( $pop->login( $u_name, $p_word ) > 0 ) { my $msgnums = $pop->list() || die $!; foreach my $msgnum ( sort keys %$msgnums ) { my $uidl = $pop->uidl( $msgnum ); ## Check if message was previously read ## If not, read, parse, and move on } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: pop3 issue
by mr_mischief (Monsignor) on Jan 31, 2008 at 04:22 UTC | |
by GaijinPunch (Pilgrim) on Jan 31, 2008 at 05:51 UTC |