in reply to Multiple Match (Sort of AND)

I came up with following -

perl -e '$a = "abc print pqr scan xyz"; print "matched\n" if($a =~ /(? +=.*(?=scan))(?=.*(?=print))/)' matched