No such thing as a small change | |
PerlMonks |
Re: Why is it good practice for a cli script to take switch args before file list?by davorg (Chancellor) |
on Jul 19, 2006 at 15:33 UTC ( [id://562319]=note: print w/replies, xml ) | Need Help?? |
I don't know why it's a standard (the origins are probably somewhere deep in the past of Unix time) but the important thing is that it _is_ now a standard. People used to Unix commands will expect the usual method of dealing with command line options. Changing that is likely to confuse people unnecessarily. Having said that, it's simple enough to change the behaviour of the Getopt::* modules. They all act on @ARGV so you just need to shift your filename off of the front of @ARGV before calling the option parsing function.
-- <http://dave.org.uk> "The first rule of Perl club is you do not talk about
Perl club."
In Section
Seekers of Perl Wisdom
|
|