This call gives the basic html table with current data and forecast for the next four periods ("tonight", "tomorrow","tomorrow night","day after") and warnings in an (I think) attractive, easy to read way.

Max Items is a way to limit the number of items in the table returned... I think it looks best with no more than 4...5 gets crowded looking.

process_city_hourly(CITY,STATE,FILENAME,FILEOPT,LWP_UserAgent)

FILENAME is the file read from with FILEOPT "usefile" and written to if FILEOPT is "save"

FILEOPT can be one of the following

- save
will get and save the data to FILENAME
- get
will retrieve new data (not store it)
- usefile
will not retrieve data from URL,
use FILENAME for data

The fifth argument is for a user created LWP::UserAgent(3) which can be configured to work with firewalls. See the LWP::UserAgent(3) manpage for specific instructions. A basic example is like this:

The return is a three element list containing a) a string of the date/time of the forecast, b) a reference to the list of warnings (if any), and c) a reference to the hash of forecast. I recommend calling it like this:

This sub is to get the block of data from the data source, which is chosen with the FILEOPTswitch.

get_city_hourly(CITY,STATE,FILENAME,FILEOPT,LWP_UserAgent)

This function gets the current weather from the data source, which is decided from FILEOPT(explained above). Input is CITY, STATE, FILENAME (filename to read/write from if FILEOPTis "get" or "usefile"), and UserAgent.

This function returns a reference to a hash containing the data. It

Same FILEOPTand LWP_UserAgent from above, and process the current weather data into an english sentence.