use warnings; use strict; use Getopt::Long qw(GetOptions); my %opt = (logdir => 'foo'); GetOptions(\%opt, qw(logdir=s)) or die; print "logdir=$opt{logdir}\n"; __END__ Run it like: myprog.pl -logdir bar Output: logdir=bar
In reply to Re: getopt::std to pass arguments to command line help
by toolic
in thread getopt::std to pass arguments to command line help
by hextor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |