in reply to Re: Re: Re: Re: Can PERL know a line without matching?
in thread Can PERL know a line without matching?
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.if (($para =~ /$msisdn/) && ($lastHeading eq "MSTerminating")) {
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
|
|---|