in reply to Re: Weather Forecast CGI
in thread Weather Forecast CGI

Two minor things:

  1. You don't support cities with spaces in the name
  2. You've got Connecticut as "CN" instead of "CT"

As an additional level of optimization, you could just pull the state (and country) data from the noaa.gov page directly, so you always get the ones that are supported there, and then template out the HTML with some brief HTML::Template fu. Easy to do, and makes the code a lot smaller.