Welcome to the Monastery | |
PerlMonks |
Re: Re: Re: Re: Re: Can PERL know a line without matching?by da (Friar) |
on Jul 30, 2001 at 23:57 UTC ( [id://100941]=note: print w/replies, xml ) | Need Help?? |
The 'and' operator, &&, works very simply. It takes two arguments.
It evaluates the first argument, and if it's successful, it evaluates
the second argument. If that's successful, it returns '1'.
I hope that helps. I think what you want for your 'if' statement is something like: That is, if $para includes the text in $msisdn, and $lastheading exactly equals "MSTerminating", then do the following. One stylistic point; you should definitely think about use strict and use warnings' and you should definitely indent your code inside loops, because it prevents a number of confusions later. HTH. -Daniel
In Section
Seekers of Perl Wisdom
|
|