Click here to get back home

First line in body of Mail::POP3Client

 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
First line in body of Mail::POP3Client eng.john84 03-23-2007
Posted by eng.john84 on March 23, 2007, 9:43 am
Please log in for more thread options


How to write this code if ( FIRST LINE IN BODY TRUE FOR EXAMPLE
HELLO)
{

print $_, "\n"; } please help me to wrile this code


code:


#!/usr/local/bin/perl


use Mail::POP3Client;


$pop = new Mail::POP3Client( USER => "xxxxxxxxx",
PASSWORD => "xxxxxxx",
HOST => "xxxxx" );


{
foreach ( $pop->Body( 1 ) ) {


if ( FIRST LINE IN BODY TRUE FOR EXAMPLE HELLO)
{


print $_, "\n";


}}}


Posted by Keith on March 23, 2007, 11:27 am
Please log in for more thread options


On Mar 23, 8:43 am, eng.joh...@gmail.com wrote:
> How to write this code if ( FIRST LINE IN BODY TRUE FOR EXAMPLE
> HELLO)
> {
>
> print $_, "\n"; } please help me to wrile this code
>
> code:
>
> #!/usr/local/bin/perl
>
> use Mail::POP3Client;
>
> $pop = new Mail::POP3Client( USER => "xxxxxxxxx",
> PASSWORD => "xxxxxxx",
> HOST => "xxxxx" );
>
> {
> foreach ( $pop->Body( 1 ) ) {
>
> if ( FIRST LINE IN BODY TRUE FOR EXAMPLE HELLO)
> {
>
> print $_, "\n";
>
> }}}

Unless I have missed the question entirely, I usually do something
like:

foreach ( $pop->Body( 1 ) ) {

last if ($firstLine++);
print $_, "\n";
}


But then, why bother w/ the look at all?


Posted by eng.john84 on March 23, 2007, 12:42 pm
Please log in for more thread options


> On Mar 23, 8:43 am, eng.joh...@gmail.com wrote:
>
> > How to write this code if ( FIRST LINE IN BODY TRUE FOR EXAMPLE
> > HELLO)
> > {
>
> > print $_, "\n"; } please help me to wrile this code
>
> > code:
>
> > #!/usr/local/bin/perl
>
> > use Mail::POP3Client;
>
> > $pop = new Mail::POP3Client( USER => "xxxxxxxxx",
> > PASSWORD => "xxxxxxx",
> > HOST => "xxxxx" );
>
> > {
> > foreach ( $pop->Body( 1 ) ) {
>
> > if ( FIRST LINE IN BODY TRUE FOR EXAMPLE HELLO)
> > {
>
> > print $_, "\n";
>
> > }}}
>
> Unless I have missed the question entirely, I usually do something
> like:
>
> foreach ( $pop->Body( 1 ) ) {
>
> last if ($firstLine++);
> print $_, "\n";
>
> }
>
> But then, why bother w/ the look at all?




Actually i check first word or line because if the line true (message
i need) ther`s a sms will send to my mobile as a reply back because
i`m not at home so, i need to check just first line (the above code
not works to me ) i hope to help me about this code THANKS


Similar ThreadsPosted
Mail:Sender - HTML Mail with alternatives problem July 21, 2004, 6:44 pm
POP3Client problem with SSL February 20, 2005, 4:42 pm
I have problem with POP3Client&Sendmail Module, Please Help. April 20, 2007, 4:34 am
Print Subject without characters Just Numbers using POP3Client. Please Help April 10, 2007, 11:27 pm
How to print just numbers includes in Subject using POP3Client Module. April 9, 2007, 9:18 pm
CGI script with target in the body August 17, 2005, 10:26 am
MIME::Parser .. how to get just the message part of the body September 7, 2005, 10:28 am
SOAP::LITE Can't read entity body July 1, 2005, 5:34 pm
Problem with body text extraction with HTML::Parser December 13, 2005, 3:28 pm
how to display html in email message body with mime:: entity July 11, 2004, 10:45 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap