Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Clear questions and runnable code
get the best and fastest answer
 
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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (9)
As of 2014-04-25 09:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (586 votes), past polls