convenientstore has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; use Getopt::Std; sub usage { print <<NOW; usage : $0 [-h] -l<something> -t<somethig> -f<file> syntax: -h prints this help text and exists -l sometihng -t someting -f something NOW exit 0; } my $o={} ; getopt('hltf', $o); #usage() if $$o{h}; if ($$o{h}) { usage(); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: getopt::std help
by davidrw (Prior) on Jan 07, 2008 at 02:45 UTC | |
by convenientstore (Pilgrim) on Jan 07, 2008 at 02:57 UTC | |
by hipowls (Curate) on Jan 07, 2008 at 08:04 UTC | |
by convenientstore (Pilgrim) on Jan 08, 2008 at 23:21 UTC |