in reply to Any way to call GetOptions with evaluated / interpoltated args ?
You've omitted the sigil when declaring $arg1 - were you not using strict? Here's the trivial example, anyway:
$ cat opts.pl #!/usr/bin/env perl use strict; use warnings; use Getopt::Long 'GetOptions'; my $arg1; my %opt = ('arg1=s' => \$arg1); GetOptions (%opt); print "arg1 is $arg1\n" if defined $arg1; $ ./opts.pl --arg1=foo arg1 is foo $
"It doesn't work" is as useful to a developer as "I'm ill" is to a medic. Try to be specific. SSCCE is best.
|
|---|