Here are some more alternatives, based on yours, which generate the output I was after, including removal of the <pre> tags. I guess your code is more correct via web standards, though.
perl -ne 'm|<pre>|..m|</pre>| and s/\n/<p>\n/;m|</?pre>| or print' htm +lfile perl -ne 'chomp;m|<pre>|..m|</pre>| and $_.="<p>";s|</?pre><p>|| or pr +int "$_\n"' htmlfile
Thanks for your ideas.
In reply to Re^4: Substitution inside tags, as 1 line
by tel2
in thread Substitution inside tags, as 1 line
by tel2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |