http://www.perlmonks.org?node_id=997056


in reply to Options with optional values and condititions

Looks like you're looking for Getopt::Long::Descriptive.