You need to tell XML::Twig explicitly that you want to parse XML, not HTML. There probably should be a parseurl_html method (there's parse_html and parsefile_html), but it's missing, so you need one of the following workarounds:
$twig->safe_parseurl_html($url) or die;
OR
use LWP::Simple;
$twig->parse_html(get($url) or die "error downloading HTML");
Update: Fixed parse to parse_html, sorry. Also, as you already get the html above, you only need $twig->parse_html($html). Though I'd recommend $twig->safe_parseurl_html($url, $agent) or die instead because that way it sure gets the encoding right.