in reply to HTML Tag Remover
Have you ever looked at HTML::Parser? try 'perldoc HTML::Parser' or look at cpan for it.
Objects of the HTML::Parser class will recognize markup and separate it from plain text (alias data content) in HTML documents. As different kinds of markup and text are recognized, the corresponding event handlers are invoked.
I would recommend against rolling your own, if you are new.
J. J. Horner Linux, Perl, Apache, Stronghold, Unix firstname.lastname@example.org http://www.knoxlug.org/