perl -00 -ne 'print if /--Begin--/ && /--End--/' file.txt