in reply to fetching a gzipped website
Use WWW::Mechanize. It will honor the Transfer-Encoding headers.