My appologies, I had windows open from both PHP and Perl forums so I didn't see which I was posting to.
Perl version:
Code:
$code = "This<HTML>should<head>be<foo>HTML<bar>free</b>";
$code =~ s/<.+?>//g;
print "Content-type: text/plain\n\n";
print $code;