- or download this
#! /usr/bin/perl
...
# Show the string with the HTML put back in.
print "-----\n", $str, "\n\n" ;
- or download this
This <b>contains</b> both text
and <a href="http://www.w3c.org">html</a>.
...
-----
This <b>contains</b> both text
and <a href="http://www.w3c.org">html</a>.
- or download this
# Sub the tags back in.
$str =~ s|<(\d+)>|<$tags[$1]>|gs ;