# Gets options from commandline and checks these vigerously.
- my ( $script, # name of script
+ my ( $script, # name of script
) = @_;
# Returns hash
@options,
);
-# print STDERR Dumper( \%options ) and exit;
+ $options{ "script" } = $script;
- $options{ "script" } = $script;
+# print STDERR Dumper( \%options );
+
+ if ( scalar( keys %options ) == 1 or $options{ "help" } ) {
+ return wantarray ? %options : \%options;
+ }
$options{ "cols" } = [ split ",", $options{ "cols" } ] if defined $options{ "cols" };
$options{ "keys" } = [ split ",", $options{ "keys" } ] if defined $options{ "keys" };