Thank you for the good advice; I had never before heard of use constant, Pod::Usage, or LWP. They will be very useful to me... especially LWP. I have a lot of scripts that grab stuff from the web and I always go through the rigamarole I did in this script.

I'm going to try creating a module as you suggested. I've never tried that before, so it will be a good learning experience.