dannyd has asked for the wisdom of the Perl Monks concerning the following question:
Hello monks,
I have been trying to match the pattern below, but have been greatly unsuccessful. There are 5 lines in the Output
This is the code I have been trying,-------------------------------------------------------------- Perl Progress -------------------------------------------------------------- dannyd@cli>
#!/usr/bin/perl open (FH, "test.txt"); while (<FH>) { print "Match!!\n" if ($_ =~ /^-+\nBG/ms); } close (FH);
I am able to match any one of the lines, but when I try to match the next one using the same regular expression, It fails, please help me figure out why this is happening
And any good material to read on multi line matching would also be highly appreciated
Back to
Seekers of Perl Wisdom