in reply to Re: How to use getopt and $#argv together?
in thread How to use getopt and $#argv together?
That's because you pass in the opt variable, but don't define any options to search for.
325$ perl -MGetopt::Std -E'getopt(\%opts); say "@ARGV";' -- -f a -d b +-r -v a -d b -r -v 326$ perl -MGetopt::Std -E'getopt("fdrv",\%opts); say "@ARGV";' -- -f +a -d b > 327$
As Occam said: Entia non sunt multiplicanda praeter necessitatem.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to use getopt and $#argv together?
by ikegami (Patriarch) on Mar 09, 2011 at 23:15 UTC |