perl -pi.bak -e 'undef $/; s/line1\nline2/new content/' files .. [download]
In reply to Re: How can I match a multi-line regexp? by markjugg in thread How can I match a multi-line regexp? by Anonymous Monk