Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jjohn (22)

  (email not shown publicly)
AOL IM: taskboy3000 (Add Buddy, Send Message)

Perl hack/Linux buff/OSS junkie.

Journal of jjohn (22)

Friday September 05, 2003
11:50 AM

when getopts params attack!

[ #14515 ]

File this one under mind-working-against-you dept.

I'm working a program that accepts various command line arguments. I normally like order the commands alphabetically (I don't know why). I group the ubiquitous help options ('?' and 'h') together at the front followed by the program-specific options. For this program, the options look like this:

my $opts = {};
getopts('?hP:U:d:l:u:v', $opts);

I hear it all the time: Joe, why do you make so many gay jokes? Is it because you're afraid you're gay? That's when I say: listen VOICE IN MY HEAD, you mind your own bidniz.

(props to Dave Attell.)

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.