if ($content =~ /(&(?:[lg]t|amp|quot);)/) { carp "Possible double-encoded HTML entity ($1) found in results"; } #### my $mech = WWW::Mechanize::Warnings->new( stringified_references => 1, valid_dtd => 1, encoded_entities => 0, valid_html => 1, );