I like
Particle's comments, and would just add two parts to it.
- I'd recommend use of Getopt::Long versus Getopt::Std - that way, you could take arguments such as --host and -h for the host, etc.
- Add some POD documentation, and use the Pod::Usage module to allow for a nice way to print the POD to your user. Pod::Usage and Getopt::Long really work well together. Anytime I write something now, I always use the two to include help options, as well as portable documentation.
Update: As per
crazyinsomniac, it was pointed out that I forgot to link in the tutorial - so here you go. =)
The Dynamic Duo --or-- Holy Getopt::Long, Pod::UsageMan!
~Brian