Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Precedence for Idiots

by Melly (Hermit)
on Dec 01, 2006 at 14:11 UTC ( #587193=perltutorial: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if($x){
      $y=1;
    ...
    else{
      $y=0;
    }
    
  2. or download this
    $y = $x ? 1 : 0;
    
  3. or download this
    $x ? $y=1 : $y=0;
    
  4. or download this
    $x ? $y=1 : $y=~s/.*/0/;
    
  5. or download this
    $x ? $y=1 : ($y=~s/.*/0/)
    
  6. or download this
    $x ? $y=1 : ($y=0);
    
  7. or download this
    $y = $x ? 1 : 0;
    
  8. or download this
    $x = ((((((1 * 2) * 3) * (4 ** 2)) * 5) * 6) * 7)
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perltutorial [id://587193]
help
Chatterbox?
[LanX]: oh I see - a deeply buked discussion
[erix]: auto-da-fe duncey hats
LanX can only recommend css settings hiding certain monkssess ;)
[LanX]: I can't hear the word inquisition without Mel Brooks jumping in front of my inner eye

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2017-01-18 00:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (159 votes). Check out past polls.