|Perl Monk, Perl Meditation|
Re: Keep It Simple, S*****by brassmon_k (Sexton)
|on Aug 31, 2001 at 23:26 UTC||Need Help??|
I believe this is more simple than all of your examples but everybody has their idea of simple.
I know "lastHeading" isn't defined yet along with "msisdn" but this worked! It delimits what is printed by the subheading. I can also add in more delmiters because for the phone number line even though that one moves around I'll just tell it to match the phone number delimited by the subheading off of $_ so I don't have to worry.
So if the script finds subheading "mSTerminating" and if it finds a match for "recordSequenceNumber" then it prints line 4. See I found out in my datablocks that "recordSequenceNumber" is in lines4, 5, or 8 so I just say
print line4 if "recordSequenceNumber" is matched on line4
print line8 if "recordSequenceNumber" is matched on line8
Of course this is in it's very prelim form I just wanted to show ya that I found an easy way.