Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Getopts and required args

by takshaka (Friar)
on Jun 23, 2000 at 07:04 UTC ( [id://19546]=note: print w/replies, xml ) Need Help??


in reply to Getopts and required args

die "-l requires an argument\n" if exists $Options{l} && !defined $Options{l};

Replies are listed 'Best First'.
RE: Re: Getopts and required args
by Anonymous Monk on Jun 23, 2000 at 20:20 UTC
    Sweet. Thanks :) I won't necessarily use "die", because I want to show the user the ShowUsage text, and I don't necessarily want to list a line number from the source. But this is what I was looking for. Thanks!
RE: Re: Getopts and required args
by husker (Chaplain) on Jun 23, 2000 at 20:26 UTC
    Uh I already thanked you, but did it before I logged on (I was so anxious to try it..) ... anyway, thanks again from the "official" husker :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://19546]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2024-03-28 19:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found