http://qs1969.pair.com?node_id=747785

japhy has asked for the wisdom of the Perl Monks concerning the following question:

I don't know if this is a problem with gmail's POP3 service or the Net::POP3 (and Net::POP3::SSLWrapper) module, or some devilish combination of the two.

I have a gmail account, foo@gmail.com, that has POP3 enabled for all email, and the option for "delete gmail's copy of the email" is set.

And yet, when I run the code below, the message is not deleted. No error message is available (as far as I know). Has anyone had a similar problem with a home-grown gmail POP3 program?
use Net::POP3::SSLWrapper; use strict; use warnings; pop3s { my $pop = Net::POP3->new('pop.gmail.com', Port => 995) or die "can't + make pop3 connection: $!"; my $nm = $pop->login('foo@gmail.com', 'password'); my $msgs = $pop->list; while (my ($id, $data) = each %$msgs) { print "Message ID: $id\n"; $pop->delete($id); } }; __END__ Here is actual output: [root@XBASEBK1 popgrabber]# perl jxp.pl Messages: 4 Message ID: 4 Message ID: 1 Message ID: 3 Message ID: 2 [root@XBASEBK1 popgrabber]# perl jxp.pl Messages: 4 Message ID: 4 Message ID: 1 Message ID: 3 Message ID: 2 [root@XBASEBK1 popgrabber]# perl jxp.pl Messages: 4 Message ID: 4 Message ID: 1 Message ID: 3 Message ID: 2
Any ideas?

Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
Nos autem praedicamus Christum crucifixum (1 Cor. 1:23) - The Cross Reference (My Blog)