#!/usr/bin/perl # # retrieve current weather conditions and cache them locally # author: Jacques Distler, 12/2004 use strict; require LWP::UserAgent; ##### # # customize these: # my $xml_file = '/Users/distler/Sites/weather/current.xml'; my $remote_url = 'http://weather.gov/data/current_obs/KATT.xml'; my $agent = 'AustinWeatherBot/0.2'; # ##### # fetch the remote XML file and cache it locally my $ua = LWP::UserAgent->new; $ua->agent($agent); $ua->mirror( $remote_url, $xml_file);