#!/usr/bin/env perl # # Name: TestFetch.pl # # Requires Internet access # use strict; use warnings; use LWP::Simple; use HTML::Parser; use HTTP::Status qw(:constants :is status_message); package main; my $text = 'http://www.archive.org/sitemap/sitemap_00000.xml.gz'; my $filename = 'sitemap_00000.xml.gz'; my $hstatus = 0; $hstatus = LWP::Simple->getstore ($text, $filename); if($hstatus != HTTP_OK) { print "$hstatus: ", status_message($hstatus), "\n"; }