On Thu, Oct 16, 2003 at 12:12:17PM -0700, John W. Krahn wrote: > $ perl -MO=Deparse -p -i -e 's/$oldsting/$1\n$nextline/' file.txt > LINE: while (defined($_ = <ARGV>)) { > s/$oldsting/$1\n$nextline/; > } > continue { > print $_; > } > -e syntax OK
My crystal ball says you are using 5.6.1. 5.8.0 and subsequent releases give: $ perl5.8.1 -MO=Deparse -p -i -e 's/$oldsting/$1\n$nextline/' BEGIN { $^I = ""; } LINE: while (defined($_ = <ARGV>)) { s/$oldsting/$1\n$nextline/; } continue { print $_; } -e syntax OK which is a little more accurate. -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]