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

RE: using a hash of functions

by runrig (Abbot)
on Sep 27, 2000 at 20:39 UTC ( [id://34233]=note: print w/replies, xml ) Need Help??


in reply to using a hash of functions

And to be more perlish, I'd probably do it this way:
while(<>) { chomp; my $func = uc($_); print (qq!"$func" not defined\n!), next unless exists $functions{$fu +nc}; $functions{func}->(); }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2024-03-28 22:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found