Is there a way to force the use of -flags when reading in command-line arguments using Getopt::Long? For example in my current situation:
GetOptions('r=s' => \$var1,
'lf=f' => \$var2,
'uf=f' => \$var3,
'trd=i' => \$var4,
'vd=f' => \$var5)
or die("$usage");
The script does not exit or display $usage if the arguments are still provided but without the flags (such as -lf). Instead it runs regardless until it inevitably errors later on as the arguments were not read into their respective variables (and may well be in the wrong order).