http://www.perlmonks.org?node_id=1217663


in reply to Any downsides to this slurp idiom?

Thanks everyone for your replies! :-) For completeness, here are some slurping examples, incorporating various suggestions:

Minor edits for clarity.

Update 2: Actually, I made a mistake in the last example when I first fixed it, it is now tested and correct.