in reply to Script Help!

Take a look at Getopt::Long. It's part of the standard Perl distribution (no CPAN installations required) and the documentation has lots of tips and examples.

As a general rule, when you find yourself writing the the same (or very nearly the same) code over and over again, think subroutine. Most of those blocks of print statements are identical except for the error message: it would have been better to put that in a subroutine (perhaps called usage) and then replaced all those blocks of code with usage($error_message)

The doco shows an alternative method using POD and a GetOptions function which should help with checking the commandline options.

-- Ken