#!/usr/bin/perl -w use strict; use LWP; use WWW::Mechanize; my $now_string = localtime; my $mech = WWW::Mechanize->new(); my $filename = join('_', split(/\W+/, $now_string, -1)); $mech->credentials( '*********' , '***********'); $mech->get('http://datawww2.wxc.com/kml/echo/MESH_Max_180min/') or die "Error: failed to load the web page"; #print $mech->response()->content(); $mech->follow_link(n => 8) or die "Error: failed to download content"; $mech->save_content("$filename.kmz");