my $re = join ' ', map "(?= .*? \Q$_\E)", @ARGV; if ($entry =~ /^ $re/sx) { ... } #### m{ ^ (?= .*? bill ) (?= .*? clinton ) }xs #### from the start fail unless we can find some characters followed by "bill" _and_ (still from the start) fail unless we can find some characters followed by "clinton" succeed