Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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

by TimToady (Parson)
on Feb 20, 2010 at 16:33 UTC ( #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? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2022-08-13 09:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?