my %opt =( shell => "bash", foo => "/some/path", input => undef, # yes, i know this doesn't need to be here ); GetOptions(\%opt, 'shell=s', 'foo=s', 'bip', 'bar', 'baz' );