Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^4: in search of a more elegant if then else

by TimToady (Parson)
on Feb 20, 2010 at 16:33 UTC ( [id://824399]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    say (if $_ { 'fred' } else { 'bill' }) for 0..1;
    
  2. or download this
    for 0..1 {
        say do if $_ { 'fred' } else { 'bill' }
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://824399]
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: (4)
As of 2024-03-29 09:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found