use HTML::FromText; use HTML::Entities; my $text=shift; my $t2h = HTML::FromText->new({ paras => 0, blockcode => 0, tables => 0, bullets => 0, numbers => 0, urls => 1, email => 1, bold => 0, underline => 0, metachars => 0, }); $text=encode_entities($text, '<>&"'); my $html=$t2h->parse($text);