AW: :POP3 -- download only x number of mails

2009-12-13 Thread Thomas Bätzler
Agnello George asked: > I am planning to use the Net::POP3 module to downald a mail box and then > pass the mails via a parser . I would like to know if the there is a > option to downlod only a certin number ( 100 ) of mails [unread] > and then mark the mails as read . The mail box sie is 40

Net::POP3 -- download only x number of mails

2009-12-13 Thread Agnello George
Hi I am planning to use the Net::POP3 module to downald a mail box and then pass the mails via a parser . I would like to know if the there is a option to downlod only a certin number ( 100 ) of mails [unread] and then mark the mails as read . The mail box sie is 400 mb . And is there a way to

Re: pid file issues...? HUH???

2009-12-13 Thread Owen
On Wed, 9 Dec 2009 11:43:44 -0800 (PST) cerr wrote: > Hi There, > > I use below code to make sure i have only one instance of my script > running at a time. But weirdly enough i sometimes seem to have running > two instances. This script is getting called on a regular basis by a > cron job and m

Re: a question on the symbol

2009-12-13 Thread Peter Scott
On Sun, 13 Dec 2009 23:43:44 +0800, Xiao Lan (小兰) wrote: > Hello, > > my $obj; > > my $h; > foreach $h (@{ref($hosts) ? $hosts : [$hosts]}) { > $obj = $type->SUPER::new( > PeerAddr => ($host = $h), > PeerPort => $arg{Port} || 'smtp(25)', LocalAddr => > $arg{LocalAddr}

Re: pid file issues...? HUH???

2009-12-13 Thread Shawn H Corey
C.DeRykus wrote: > There's a tiny race condition at this point since the pidfile still > hasn't been created. What if another cron fires off during this > very short window, doesn't see the pidfile, then slips through... > Or, maybe even the shorter window between pidfile creation > and its cont

Re: pid file issues...? HUH???

2009-12-13 Thread C.DeRykus
On Dec 9, 11:43 am, ron.egg...@gmail.com (Cerr) wrote: > Hi There, > > I use below code to make sure i have only one instance of my script > running at a time. But weirdly enough i sometimes seem to have running > two instances. This script is getting called on a regular basis by a > cron job and m

a question on the symbol

2009-12-13 Thread 小兰
Hello, my $obj; my $h; foreach $h (@{ref($hosts) ? $hosts : [$hosts]}) { $obj = $type->SUPER::new( PeerAddr => ($host = $h), PeerPort => $arg{Port} || 'smtp(25)', LocalAddr => $arg{LocalAddr}, LocalPort => $arg{LocalPort}, Proto => 'tcp', Timeout

Re: Eval scoping question

2009-12-13 Thread C.DeRykus
On Dec 11, 10:52 am, rvtol+use...@isolution.nl (Dr.Ruud) wrote: > C.DeRykus wrote: > > Dr.Ruud: > >> C.DeRykus: > >>>      eval { asub() }; > >>>      die $@ if $@; > > >> You need to test the return of eval itself to be sure. > > ... > perl -wle ' > >    die "An error: ", $@ || "whoopy" >      i

Re: DBD::mysql::st execute failed: MySQL server has gone away

2009-12-13 Thread Dr.Ruud
Ryan Chan wrote: Sometimes, my sql is running for a quite long time, e.g. 1 hour The perl script will warn "DBD::mysql::st execute failed: MySQL server has gone away at ..." and my script failed. I have already set the auto reconnect, e.g. $dbh->{mysql_auto_reconnect} = 1; But problem still