use CGI qw( escapeHTML );
use URI::Escape qw( uri_escape );
foreach my $line (@results)
{
my ($first, $second, $third) = split(/::/, $line);
my ($ue_first, $ue_second, $ue_third) = map uri_escape($_),
$first, $second, $third;
my ($he_first, $he_second, $he_third) = map escapeHTML($_),
$first, $second, $third;
print qq($he_first $he_third
);
}