while (){ print "matched\n" if /publish/ and /date/; } #### while (){ print "matched\n" if /publish.*date/; }