ken@ganymede: ~/tmp $ cat pm_re2_file.txt Hello World --Begin-- Cat and Dog --End-- other stuff This is a test Good Bye ken@ganymede: ~/tmp $ RE1="--Begin--" RE2="--End--" perl -00 -ne 'print if /$ENV{RE1}/ && /$ENV{RE2}/' pm_re2_file.txt --Begin-- Cat and Dog --End-- ken@ganymede: ~/tmp $