XML documents can be parsed with regular expressions
PDF document coordinates are specified in
The top-level "component" in an Excel file .xls is
To compute the Great Circle distance in Listing 20.2 you needed what module?
None. The acos, sin, and cos functions are built into Perl.
a. But not really. As explained in Hour 19, "Data Processing," it's possible to extract specific pieces of information from an XML document with regular expressions. However, as a general-purpose parsing tool it doesn't work well.
a. Points (72 points per inch).
a. The hierarchy goes: a workbook has worksheets; worksheets have rows, columns, and cells.
c. Math::Trig. If you answered (d), you were close. Perl has sin and cos as built-in functions, but not acos (arc cosine).
Surf the net and find some icons (gifs, jpegs) for various weather phenomenon (rain, clouds, sun, and so on). Place these on the PDF weather report in an appropriate location.
Almanac information for your area can be obtained by consulting the U.S. Naval Observatory web site. If you submit the following URL (all on one line):
a table of sunrise and sunset for your location will be generated. The fields are:
yy0 1 = Latitude North, -1 = Latitude South
yy1 = Degrees Latitude
yy2 = Minutes Latitude
xx0 1 = Longitude East, -1 = Longitude West
xx1 = Degrees Longitude
xx2 = Minutes Longitude
zz0 1 = East of Greenwich, -1 = West of Greenwich
zz1 = Number of hours east or west of Greenwich
Because you've computed latitude and longitude, you're using ZIP codes so it's reasonable to assume the addresses are all in the United States (west and north); the only real problem is computing how many hours west of Greenwich the ZIP code is. This is left as an exercise for the reader.
© 2000- NIV