CUFP
ybiC
snippet
<div class="Description">Perl one-liner to add HTML break to each line of a text file. Single quotes shown are for *nix, use double quotes for Win32.
<p>
Thanks to monks (I forget who) who helped me in the CB months ago on this. With [grinder]'s [id://117450|Perl Monks Snippets Index] now [http://grinder.perlmonk.org/pmsi/|active] at [jcwren]'s [http://perlmonk.org|perlmonk.org host], this seems worth posting.</div>
<br><br>
<CODE>perl -pe 's/^(?!(<p>|<br>))/<br>/gi;' < original_file > new_file</CODE>
<br><br>