http://www.perlmonks.org?node_id=538095


in reply to Checking the Weather

If you already have LWP::Simple installed:
use strict; use LWP::Simple; my $content = get("http://www.weather.com/weather/local/12986?"); die "Couldn't get it!" unless defined $content; my $weather; if ($content =~ m!<B CLASS=obsTextA>([^<]*)</B>!) { $weather = $1; } else { die "Can't find weather on page!\n"; } print "weather = $weather\n";