I was trying to match the string "patch-5.1.1.21510.gpg" to the above multiline string. I tried the pattern modifier for multiline match, but couldnt match it. All I had to do was use grep which I dont think is needed here.my $output = "update patch-5.1.1.21510";
What am I missing here?my @array = split('\n',$output); if ( grep { $_ =~ /$PatchPath/ } @array ) { print "Match found\n"; }
In reply to Multiline match by arunbhargav
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |