$/ = "----\n"; while () { print "{\n", $_, "}\n"; } __DATA__ foo bar ---- baz ---- quack