"be consistent" | |
PerlMonks |
Re: How can I match a multi-line regexp?by wesal (Initiate) |
on Aug 11, 2010 at 20:50 UTC ( [id://854507]=note: print w/replies, xml ) | Need Help?? |
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 ..
In Section
Seekers of Perl Wisdom
|
|