{ local $/ = " End"; while (<>) { s/.* Start//; chomp; # removes $/ (" End") from end of string print; } }