Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Checking the Weather

by Thelonius (Priest)
on Mar 21, 2006 at 01:11 UTC ( [id://538095]=note: print w/replies, xml ) Need Help??


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";

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://538095]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2024-06-18 03:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.