in reply to Why is it good practice for a cli script to take switch args before file list?
To (non-)answer your stated question first: I have no good answer for "why" beyond "it's the (POSIX) standard".
The gnu tools happily ignore this standard, so I have no qualms about doing the same.
Adressing your want: I don't think you can with Getopt::Std, but Getopt::Long can be configured to allow it, and I invariably do so. The configure option is called "permute", and is usually the default. It is also implied by the "gnu_getopt" option, which makes it behave like GNU getopt_long, and is what I normally use:
use Getopt::Long ':config', 'gnu_getopt'; # or, during runtime: # Getopt::Long::Configure('gnu_getop');
print "Just another Perl ${\(trickster and hacker)},"
The Sidhekin proves Sidhe did it!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Why is it good practice for a cli script to take switch args before file list?
by leocharre (Priest) on Jul 19, 2006 at 16:59 UTC | |
by Sidhekin (Priest) on Jul 19, 2006 at 17:10 UTC | |
by leocharre (Priest) on Jul 19, 2006 at 21:06 UTC |