Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

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)


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://496158]
[TStanley]: I'm sitting in the airport in Tampa, Florida at the moment, getting ready to head home.
[talexb]: TStanley I'm flying to Vegas in two weeks time. After that flights leaving Vegas and Phoenix are late at night .. I've been hearing that it gets so hot that the air isn't dense enough for planes to take off. Weird. Guess you won't have that problem.

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (10)
As of 2017-06-23 14:13 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (548 votes). Check out past polls.