bill lam wrote: > 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.
If you think the one-liner is non-trivial then all the more reason that you should use a proper script. It is a bad idea to use any code unless you understand why and how it works. Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/