This is the code which i tried.
$p = HTML::TokeParser->new("output.xml") ||
die "Can't open: $!";
print FH $p;
<greeting class="simple">Hello, world!
The above file is a sample file which i tried to insert the closing tag for the greeting. Actually i have a file which contains 500 lines of text with tagging. for. example in that file i have a tag named <to> but it's not closed. I have to insert the closing tag. This is an example. Thanks for your suggestion.