in reply to Re: getopt::std to pass arguments to command line help
in thread getopt::std to pass arguments to command line help
use Getopt::Long; use Pod::Usage; # if you have documentation embedded is better unless (GetOptions( "option=s" => \$option ... )) { pod2usage(-verbose => 1,-exitval => 'NOEXIT'); # automatic u +sage printing (if you have an usage section in POD) &wait_for_input; # if the prog + was opend in a 'double click' fashion there is no time # to review e +rrors, if so you can just use something like: # sub wait_fo +r_input{ # print "\n +\nPress Return when ready\n"; # while (<S +TDIN>){last if $_ } # } exit; # now you can + exit or die with yet another error string }
|
|---|