I am working on a small perl program that will open a site and search for the words Hail Reports and give me back the information. I am very new to perl so some of this might be simple to fix. First my code says I am using an unitialized value. Here is what I have
#!/usr/bin/perl -w
use LWP::Simple;
my $html = get("http://www.spc.noaa.gov/climo/reports/last3hours.html")
or die "Could not fetch NWS page.";
$html =~ m{Hail Reports} || die;
my $hail = $1;
print "$hail\n";
Secondly, I thought regular expressions would be the easiest way to do what I want, but I am not sure if I can do it with them. I want my program to search for the words Hail Reports and send me back the information between Hails Reports and the words Wind Reports. Is this possible with regular Expressions or should I be using a different method? Here is a snippet of the webpages source code that I want it to send back
<tr><th colspan="8">Hail Reports (<a href="last3hours_hail.csv">CSV</a>) (<a href="last3hours_raw_hail.csv">Raw Hail CSV</a>)(<a href="/faq/#6.10">?</a>)</th></tr>
#The Data here will change throughout the day so normally there will be more info.
<tr><td colspan="8" class="highlight" align="center">No reports received</td></tr>
<tr><th colspan="8">Wind Reports (<a href="last3hours_wind.csv">CSV</a>) (<a href="last3hours_raw_wind.csv">Raw Wind CSV</a>)(<a href="/faq/#6.10">?</a>)</th></tr>