Re: pie multiline replace
[email protected] (bill lam)
| Newsgroups | perl.beginners |
|---|---|
| Message-ID | <[email protected]> |
Thomas Bätzler wrote: > perl -i -ple '$_ = "cc\n$_" if $p =~ m/aa/ && m/bb/; $p=$_' Thanks. looks non-trivial for me. Anyway I will copy this idiom into my cheat sheet. Thank Gunnar for suggestion too. However I prefer one-liner. regard,