perl -ne '/^=/../^=cut/ or print' file