|
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
|