CIS 2279 Homework Assignment #14
Due Thursday, Dec 18,
2008
All files created must be saved in your class directory
/mnt/homes/CLASSES/CIS2279/<username>
- Create a perl script named lab14.pl in your user directory. The
script must perform the following operations:
- Prompt the user to enter a date (year, month and day) to retrieve LSC weather
observations.
- Retrieve station observation data from
http://apollo.lsc.vsc.edu/cgi-bin/logger.pl
- Print the following data to the screen for the requested date:
high temperature, low temperature, average temperature, highest wind
speed, and total precipitation. Print all temperature values in
both Celcius and Farenheit. Print the times that all highs and lows
occurred.
- NOTE: Date for a given date may be requested by specifying
parameters on the URL. Example for requesting data for Dec 1, 2008:
wget -q -O - http://apollo.lsc.vsc.edu/cgi-bin/logger.pl?year=2008&jday=336
A good perl example:
$url = 'http://apollo.lsc.vsc.edu/cgi-bin/logger.pl\?year='.$year.'\&jday='.$jday;
@linedata = `wget -q -O - $url`;
Note the back-slashes before the ? and & characters along with
the use of single quotes used when defining the value for $url.
last updated: 15 Dec 2008 15:20