in reply to Negative look ahead

perl -ne 'chomp; !/^<title>/ ? print "<para>$_</para>\n" : print "$_\n +"' <input_file>

Replies are listed 'Best First'.
Re^2: Negative look ahead
by pKai (Priest) on Mar 09, 2007 at 10:16 UTC

    See also perlrun, if you want to wrap ++graff's code into a 1-liner, using further options.

    perl -ple '$_="<para>$_</para>" if !/^<title>/'