Gurus,
A simple thing, but it's driven me crazy.
my %opts;
getopts( 'ahp:r:s', \%opts);
Now, assuming that -r was passed to the program on invocation, how can I
verify that the required argument was included?
I've tried this:
($opts{'r'} and (length($opts{'r'}) == 0) && die "argument
required!";
but it doesn't work--though it seems like it ought to. Tried a few other
things, too, to no avail. About ready to use a large hammer. Any
alternative suggestions appreciated.
Thanks!
Deane Rothenmaier
Programmer/Analyst
Walgreens Corp.
224-542-5150
We sleep soundly in our beds because rough men stand ready in the night to
visit violence on those who would do us harm. -- George Orwell_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs