I have a bunch of html files and need to convert and format them to text with perl i.e somthing like <br/> will be interperted to \n
I found this perl module on cpan html::formattext it format the text well but if there is link it strip it ,
are there any option with HTML::FormatText to format the html as is to text but when
there links like this
<a href="http://www.microsoft.com>http://www.microsoft.com</a>
i.e somthing like this :
<br /><b>Microsoft</b><br /><a href="http://www.microsoft.com>`
will be converted to:
microsoft
http://www.microsoft.com
Take a look at HTML::FormatText::WithLinks
Setting the
after_linkoption to, say, ” (%l)” will put the link in line after the anchor text. In your example you would getMicrosoft (http://www.microsoft.com).