Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^5: Detecting an undefined hash key

by pjotrik (Friar)
on Oct 01, 2008 at 23:43 UTC ( [id://714926]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Detecting an undefined hash key
in thread Detecting an undefined hash key

OK, again:

There only is "something strange" about s and t, because you tell getopt to read values for these switches, calling it getopt('st'). The parameter for getopt doesn't contain "allowed" switches, it contains switches that expect an argument.

If you don't need values for these switches (which seems to be the case) just don't name them in the first parameter to getopt. Getopt will still, when it stumbles upon that switch on the command line, define the hash entry for the given letter and give it a value of 1.

Replies are listed 'Best First'.
Re^6: Detecting an undefined hash key
by LesleyB (Friar) on Oct 03, 2008 at 11:46 UTC

    I'm a numpty

    Thank you for being so patient

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-04-19 00:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found