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.
In reply to Re^2: How to use getopt and $#argv together?
by TomDLux
in thread How to use getopt and $#argv together?
by iphone
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |