in reply to pattern matching an array

If I understand you correctly @reqs is an array of "requirements" that if all are true you want to accept the line? If that is the case you can create a custom subroutine on the fly using eval
@reqs = qw/foo bar cat/; $reqsub = eval 'sub { ' . (join ' && ', map { '/\\Q' . $_ . '/'} @re +qs) . ' } '; while (<DATA>) { print if &$reqsub; } __DATA__ *R_dog_cat_horse_foo_bar *R_dog_cat_foo *R_dog_cat_horse_bar *R_dog_cat_horse_foo_bar *R_cat_horse_foo_bar __OUTPUT__ *R_dog_cat_horse_foo_bar *R_dog_cat_horse_foo_bar *R_cat_horse_foo_bar

--

flounder