in reply to pattern matching an array
@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
|
|---|