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


in reply to non-option argument question

sub usage { print STDERR $_[0] if @_; print STDERR "usage: ...\n"; exit(1); } GetOptions(\%opt, 'shell=s', 'foo=s', 'bip', 'bar', 'baz' ) or usage(); defined($opt{input}) or usage("Argument 'input' is required\n");