http://www.perlmonks.org?node_id=1034981


in reply to Re^4: Multiline match
in thread Multiline match

Along the lines of your initial code:

use strict; use warnings; my $PatchPath = "patch-5.1.1.21510.gpg"; my $output = "update patch-5.1.1.21510"; my @array = split /\s+/, $output; if ( grep { $PatchPath =~ /$_/ } @array ) { print "Match found\n"; }

SORRY: This post is somehow to far up in the chain. Should be a few posts further down...