##
#!/usr/bin/perl
use strict;
use warnings;
my %host_contents;
my $host_id;
while (<>) {
chomp;
if ($_ =~ /host id="(.*?)"/)
{
$host_id = $1;
}
if ($_ =~ m{(www.*?) })
{
push @{ $host_contents{$host_id} }, $1;
}
}