swilting has asked for the wisdom of the Perl Monks concerning the following question:
I recently wrote this text which I think is not bad writing. but the script fails for no reason. I do not understand the reason for the error
#!/usr/bin/perl -w use strict; ##use Email::Simple; use Net::POP3; use Net::POP3::SSLWrapper; pop3s { my$server = 'pop.wanadoo.fr'; ##la tu dois mettre ton identifiant de connexion my $login = 'serge******'; ##la tu dois mettre tonmot de passe my$passwd = '*****'; $| = 1; print "connecting to $server..\n"; my $pop = new Net::POP3 $server or die "error: can't connect to $server: $!\n"; print "ok\n"; $pop->login($login,$passwd); $pop->ok or die "error: wrong username or password\n"; my($undelete,$size) = $pop->popstat; my$last = $pop ->last; print "mail box size: $size\n", "$undelete unread mail(s).\n", "last read mail was number $last\n\n"; my$fetched = 0; for my $num (1..$undelete) { my$msg = $pop->get($num); next unless ref $msg; $fetched += $pop->list($num); printf "\rfetched %2.0f%%",$fetched *100/$size; $pop->delete($num); } print $/; $pop->quit; }
Can you help me master the perl "Fu" to find a solution to my problem
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: how to use Net::POP3::SSLWrapper
by planetscape (Chancellor) on Jan 21, 2012 at 10:49 UTC | |
by swilting (Beadle) on Jan 21, 2012 at 17:54 UTC | |
by GrandFather (Saint) on Jan 21, 2012 at 22:33 UTC | |
Re: how to use Net::POP3::SSLWrapper
by Khen1950fx (Canon) on Jan 22, 2012 at 00:35 UTC |
Back to
Seekers of Perl Wisdom