w3b has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use warnings; use strict; use Net::POP3; my $pop3 = "pop3.***.*****.**"; my $login = "****\@***"; my $pass = "***********"; my $pop = Net::POP3->new($pop3); my $res = $pop->login($login, $pass); if ($res){ print"Connect!\nE-mail status inbox: $res post \n"; } else { print "Couldn't connect $!\n"; exit } my ($msg, $msgnums, $ni); #problem while($res){ $msgnums = $pop->last; if ($ni < $msgnums){ $msg = $pop->get($msgnums); foreach my $line ( @$msg ) { if($line =~ /^Subject: '(.*)'/ ) { system(`$1`); $ni = $msgnums; next } } } } #end of problem
jdporter moved from Snippets, per
consideration by spiritway: "Move to SoPW?"
Keep: 1, Edit: 13, Reap: 3.
|
|---|