#!/usr/bin/perl use strict; undef $/; #$/=''; while(<>){ s/^.*\*\*\* START OF THIS PROJECT GUTENBERG(.*?)\*\*\*//s; s/End of the Project Gutenberg EBook.*//s; s/\*\*\* END OF THIS PROJECT GUTENBERG.*//s; print }