Re: Shortening the ?: construct

2009-04-18 Thread Chas. Owens
On Sat, Apr 18, 2009 at 16:04, Chap Harrison wrote: > > On Apr 18, 2009, at 5:29 AM, Peter Scott wrote: > >> >> Well, if you're able to upgrade to 5.10: >> >> my $foo = $very_long_expression // "n/a"; > > THAT'S what I was remembering. > > Thanks.  Mac OS X Leopard is at 5.8 but I assume someone's

Re: Strip email attachments using IMAP.

2009-04-18 Thread Chas. Owens
On Sat, Apr 18, 2009 at 06:26, Meghanand Acharekar wrote: > Hi, > > Is it possible to strip email attachments from a remote IMAP folders & save > or download  them on local system (system on which script is running) > > I written a simple script using perl IMAPClient which connects IMAP server > a

Re: Shortening the ?: construct

2009-04-18 Thread Chap Harrison
On Apr 18, 2009, at 5:29 AM, Peter Scott wrote: Well, if you're able to upgrade to 5.10: my $foo = $very_long_expression // "n/a"; THAT'S what I was remembering. Thanks. Mac OS X Leopard is at 5.8 but I assume someone's found a way to install and use 5.10 without interfering with what t

Re: Compiler options perl

2009-04-18 Thread Jenda Krynicky
From: edw...@yandex.ru > > The problem is that I did this benchmarking before. Actually, the code > snippets above are run in > a very long cycle, and if we have "foreach" statement, then we need to store > some value for loop iteration and > even one assignment of this variable consumes time

Re: \w regular expressions unicode

2009-04-18 Thread Gunnar Hjalmarsson
Stanisław T. Findeisen wrote: Hi how to write regular expressions matching against Unicode (eg., UTF-8) strings? For instance, in my regexp: qr/^([.<>@ \w])*$/ Decode the UTF-8 encoded strings before applying the regex on them. $ perl -MEncode -le ' $utf8_encoded = "smörgåsbord"; $s = decod

RE: Strip email attachments using IMAP.

2009-04-18 Thread Jeff Pang
Could use Net::POP3 to fetch the whole message, then use MIME::Lite(::*) to parse it and get the attachment (given the case you know something about rfc822). regards. > Original Message > Subject: Strip email attachments using IMAP. > From: Meghanand Acharekar > Date: Sat, Apr

Re: Data Comparison

2009-04-18 Thread John W. Krahn
Nabeel wrote: Greetings, I need to be able to re-read a file every 60 seconds until the two changing values are the same in my data file. Once the values become the same the script simply exits. Not exactly sure if my filehandle will reread itself every 60 seconds either but I keep getting

Re: Shortening the ?: construct

2009-04-18 Thread Peter Scott
On Fri, 17 Apr 2009 22:02:37 -0500, Chap Harrison wrote: > > my $foo = ( defined $very_long_expression ? $very_long_expression : > "n/a" ); [...] > > At some point I thought I read about a shorter way to write this, that > did not involve repeating the $very_long_expression in the same > st

Strip email attachments using IMAP.

2009-04-18 Thread Meghanand Acharekar
Hi, Is it possible to strip email attachments from a remote IMAP folders & save or download them on local system (system on which script is running) I written a simple script using perl IMAPClient which connects IMAP server and read emails from there, but found no method to strip attachments ?

\w regular expressions unicode

2009-04-18 Thread Stanisław T. Findeisen
Hi how to write regular expressions matching against Unicode (eg., UTF-8) strings? For instance, in my regexp: qr/^([.<>@ \w])*$/ I am using \w because here: http://perldoc.perl.org/perlretut.html it says: === \w matches a wo

Re: Data Comparison

2009-04-18 Thread Owen
> Greetings, I need to be able to re-read a file every 60 seconds until > the two changing values are the same in my data file. Once the values > become the same the script simply exits. Not exactly sure if my > filehandle will reread itself every 60 seconds either but I keep > getting > compilat

Data Comparison

2009-04-18 Thread Nabeel
Greetings, I need to be able to re-read a file every 60 seconds until the two changing values are the same in my data file. Once the values become the same the script simply exits. Not exactly sure if my filehandle will reread itself every 60 seconds either but I keep getting compilation error