From: Bill S. <bs...@sy...> - 2000-05-08 18:46:04
|
Hi, New MH user (one day), and new to perl (again, one day), which will probably show why I couldn't solve the following in an easier manner. I found that the Weather.pl file wouldn't correctly download weather information if the configuration file's city name had a space in it (e.g. Stevenson Ranch). In the .pl file after the setting of $CityPage, I tried adding a $CityPage ~= s/ /%20/g Which worked when I logged the command, but didn't actually update the $CityPage variable when used in the $WeatherURL variable (e.g., the spaces weren't exchanged with %20). I think something along these lines should work, but I presume it not working has to do with my limited knowledge of PERL. I wound up adding a ZipCode item to the coniguration file and updating the weather.pl to use the CityName for storing the output file but the ZipCode for the actual lookup. It's all working, but my first (attempted) solution seems easier. Can anyone point out where I went wrong with it? Thanks, Bill |