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 wandering the Monastery: (5)
As of 2017-02-25 14:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (365 votes). Check out past polls.