in reply to AutoMagic HTML

You might want to look into HTML::FromText ... in particular, take a look at the "See Also" section.