Keep It Simple, Stupid | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
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.
Thanks to monks (I forget who) who helped me in the CB months ago on this. With grinder's Perl Monks Snippets Index now active at jcwren's perlmonk.org host, this seems worth posting. perl -pe 's/^(?!(<p>|<br>))/<br>/gi;' < original_file > new_file In reply to (code) One-liner adds HTML breaks to text file by ybiC
|
|