http://www.perlmonks.org?node_id=1018940


in reply to Re^2: XMLin question
in thread XMLin question

I was curious if there was some way to auto-convert < to < as well as tags like this in general instead of manually doing this, from an end user perspective.

:| You don't say :/

perl -pe "%f = qw{ < &lt; > &gt; }; s{[^><]\K([><])([^\w])}{ $f{$1}$2} +g; " < in > out