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


in reply to multi-line in-place edits

I thought this could be solved with something like -l0666,

Take a look at perlrun, -0777 will slurp the entire file. Here's a working one-liner: perl -i.bak -0777 -ne 'print "{$_}"' filenameGood luck!