Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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 scrutinizing the Monastery: (12)
As of 2014-09-19 21:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (146 votes), past polls