{ local $/ = ""; # set to paragraph mode $bad_stuff = ; # reads in until first blank line } # .. $/ is then returned to it's previous # value, and you can carry on reading from # line by line.