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

Re^2: Simple IF, IF, IF or ELSE

by dsheroh (Monsignor)
on Jun 28, 2006 at 22:02 UTC ( [id://558166]=note: print w/replies, xml ) Need Help??


in reply to Re: Simple IF, IF, IF or ELSE
in thread Simple IF, IF, IF or ELSE

Just to compress your alternative method a little bit more:
my %lookup = ( 'coffee' => 'non alky', 'beer' => 'alky', 'whisky' => 'proper alky', ); $drink = exists $lookup{$punter} ? $lookup{$punter} : 'unknown'; # or another option: # $drink = $lookup{$punter} || 'unknown';

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-04-26 04:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found