Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: using switch

by castaway (Parson)
on Sep 29, 2005 at 16:11 UTC ( #496158=note: print w/replies, xml ) Need Help??


in reply to Re^2: using switch
in thread using switch

Sounds like you just need to use dispatching. i.e. make a hash which contains the possible commands/directions as keys, and has strings to output as values. (Or probably more useful, has coderefs as values to be run)

C.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://496158]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2016-12-10 11:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (162 votes). Check out past polls.