foreach my $line (@lines) { if ( $Session->{'usrSystem'} =~ /$line/g ) { $Response->Write("Found a match! Hooray"); } }