minixman has asked for the wisdom of the Perl Monks concerning the following question:
All
if i have a simple loop that runs over each line of the file. like
Now the above would match the string i am looking for, but the \r\n splits out the end of my strings line, so the message is.
So when the code above runs it prints out.
But what i need is to catch the next line
for( split(/[\r\n]+/, $content) ) { if(($_ =~ m/35=8/)&&($_ =~ m/$tag1/)&&($_ =~ m/$tag2/)){ printf $_; }elsif(($_ =~ m/35=9/)&&($_ =~ m/$tag1/)) { printf $_; } }
Now the above would match the string i am looking for, but the \r\n splits out the end of my strings line, so the message is.
Message dump: 8=1034=DFG55=TEST90=23435=D 19 06/02/23 11:18:33:984 Sent Message
So when the code above runs it prints out.
8=1034=DFG55=TEST90=23435=D
But what i need is to catch the next line
19 06/02/23 11:18:33:984 Sent Message
Back to
Seekers of Perl Wisdom