in reply to Re: Getopt::Long
in thread Getopt::Long
Currently I identify that 'add' was called and the first if is processed with it's options. $command is NOT an option.# suppose I have the above commands (view, add, edit, set ,show) # since no command except 'add' starts with the letter 'a', I want tha +t both will work myshell> add -name test -value 40 # first myshell> a -name test -value 40 # second # in the GetOptions() function, I only have for the 'add' command, the + followings: if ($command eq 'add') { if (GetOptions(\%hash, 'name=s', 'value=i')) { &doSomething(); } } elsif ($command eq 'edit') { ... } ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Getopt::Long
by ibanix (Hermit) on Dec 16, 2002 at 08:32 UTC | |
|
Re: Re: Re: Getopt::Long
by ibanix (Hermit) on Dec 16, 2002 at 09:14 UTC | |
by hotshot (Prior) on Dec 16, 2002 at 09:25 UTC | |
by ibanix (Hermit) on Dec 16, 2002 at 20:27 UTC |