in reply to Re: question about getopt
in thread question about getopt
if you have any suggestion, Please let me know, Cheersuse strict; use warnings; use Getopt::Std; my %options; if (scalar @ARGV < 3) {usage()}; sub usage { print STDERR << "EOF"; \nThis program does... usage: $0 [-hcfo] -h : this (help) message -c : config file -o : Fj xcf release file -x : output file EOF exit; } getopts ("hc:f:o:", \%options); usage() if $options{h}; if ($options{o}) { $source_file = $options{o}; } else { $source_file = "as.xcf-dist"; } if ($options{c}) { $config_file = $options{c}; } else { $config_file = 'config.ini'; } if ($options{x}) { $dest_file = $options{x}; } else { usage(); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: question about getopt
by moritz (Cardinal) on Jun 24, 2009 at 07:41 UTC | |
by BioLion (Curate) on Jun 24, 2009 at 09:03 UTC | |
|
Re^3: question about getopt
by toolic (Bishop) on Jun 24, 2009 at 16:27 UTC |