in reply to How can I match a multi-line regexp?

To overcome the limitation with the quick in-place edit not working on matching the first-line you can remove the -p and do it yourself like:
perl -i.bak -e 'undef $/; $_=<>; s/line1\nline1/new content/g; print' files ..
  • Comment on Re: How can I match a multi-line regexp?

Replies are listed 'Best First'.