Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Simple IF, IF, IF or ELSE

by traveler (Parson)
on Jun 28, 2006 at 21:49 UTC ( [id://558161]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $drink = 'unknown';
    $drink = 'non alky' if $punter eq 'coffee';
    $drink = 'alky' if $punter eq 'beer';
    $drink = 'proper alky' if $punter eq 'whisky'
    
  2. or download this
    $drink = $punter eq 'coffee'?'non alky':$punter eq 'beer'?'alky':$punt
    +er eq 'whisky'?'proper alky':'unknown';
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-26 05:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found