Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: Learning Exercise

by runrig (Abbot)
on Jul 18, 2002 at 20:16 UTC ( [id://183031]=note: print w/replies, xml ) Need Help??


in reply to Re: Learning Exercise
in thread Learning Exercise

I like a function dispatch hash better:
# Before the loop my %action = ( l => \&entry_list, a => \&entry_add, r => \&entry_rem, s => \&entry_sea, o => sub { print "Invalid Entry\n" }, ); # Within the loop ($action{lc()} || $action{o})->();

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-03-29 00:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found