my $dom = Mojo::DOM->new($data); map{ say } $dom->find('a')->first; my $attrs = $dom->find('a')->first->attr; map{ printf "(%s)/(%s)\n", $_, $attrs->{$_} } sort keys %$attrs;