Click here to get back home

Print Subject without characters Just Numbers using POP3Client. Please Help

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Print Subject without characters Just Numbers using POP3Client. Please Help eng.john84 04-10-2007
Posted by odhiseo on April 13, 2007, 10:57 am
Please log in for more thread options



> Sorry, now I understood your question
>
> use Mail::POP3Client;
>
> $pop = new Mail::POP3Client( USER => "xxxxxxxxxxxxxxxxx",
> PASSWORD => "xxxxxxxxxx",
> HOST => "xxxxxxxxxx" );
>
> for ($i = 1; $i <= $pop->Count(); $i++) {
> foreach ( $pop->Head( $i ) ) {

> /^Subject:\.+\s(\d+)/i && print $1, "\n";
> }
> print "\n";
> sleep 5;
> }- Hide quoted text -
>
> - Show quoted text -

Here is another way to do It (TMTOWTDI)


use Mail::POP3Client;

my $n = 10; #Length of number string in the subject


$pop = new Mail::POP3Client( USER => "xxxxxxxxxxxxxxxxx",
PASSWORD => "xxxxxxxxxx",
HOST => "xxxxxxxxxx" );

for ($i = 1; $i <= $pop->Count(); $i++) {
foreach ( $pop->Head( $i ) ) {

next unless /^Subject:/;
/\s(\d)(\s|$)/;
print $1;
}
print "\n";
sleep 5;
}

And in the previous reply I had a little error, you must change:
/^Subject:\.+\s(\d+)/i && print $1, "\n";
for:
/^Subject:.+\s(\d+)/i && print $1, "\n";



Similar ThreadsPosted
How to print just numbers includes in Subject using POP3Client Module. April 9, 2007, 9:18 pm
Mail::Sender: Encoding of subject November 17, 2004, 12:56 am
CGI.PM and print table April 13, 2008, 1:18 pm
Net:Telnet problem with print October 20, 2005, 5:04 pm
Image::Magick scalar value to print use CGI April 13, 2006, 10:09 pm
POP3Client problem with SSL February 20, 2005, 4:42 pm
First line in body of Mail::POP3Client March 23, 2007, 9:43 am
I have problem with POP3Client&Sendmail Module, Please Help. April 20, 2007, 4:34 am
strings and numbers July 30, 2005, 2:28 am
strings and numbers July 30, 2005, 2:27 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap