in reply to non-option argument question
G'day dr_jkl,
Probably a typo: I'll assume my $opt should be my %opt.
If %opt is in scope, you can modify it whenever you want. So, the question seems to boil down to how to get the value to assign to $opt{input}.
The Getopt::Long documentation has a Mixing command line option with other arguments section. Is this of any help?
An example of what you want to type on the command line would be useful.
I'm guessing your code looks something like:
my %opt = ( ... ); GetOptions( ... ); # get value for $opt{input} here if ($opt{input} eq 'something') { # do something here } else { # do something else here }
Filling in the blanks (or correcting my guess) would probably lead to a better answer.
-- Ken
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: non-option argument question
by dr_jkl (Acolyte) on Sep 12, 2012 at 06:16 UTC | |
by kcott (Archbishop) on Sep 12, 2012 at 08:36 UTC | |
by dr_jkl (Acolyte) on Sep 12, 2012 at 19:41 UTC |