Thanks for the comments. As I said, it was quick and dirty and your suggestions are worthwhile additions. For the record, this was pasted out of a larger script which did have strict and warnings on and was originally set for passing in URL's from the command line, which is why that appears that way. I probably should have cleaned it up further. Certainly, adding strict and warnings even in my example to encourage good practice among others is a great suggestion.
-xdg
Code posted by xdg on PerlMonks is public domain. It has no warranties, express or implied. Posted code may not have been tested. Use at your own risk.
| [reply] |