Perl: Extended processing and validation of command line options