Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Operator Precedence

by tachyon (Chancellor)
on Jul 22, 2001 at 16:45 UTC ( [id://98813]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    open FILE, "<$file" || die "Oops $!\n";
    
  2. or download this
    print ("Hello World!\n");
    close (FILE);
    
  3. or download this
    /foo/ ? $a += 1 : $a -= 1;
    # parses as
    ...
    # but
    $a += /foo/ ? 1 : -1;
    # will work as expected.
    
  4. or download this
    $_ = 'foo';
    
    ...
    (/foo/) ? print "Found foo\n" : print "No foo here\n";
    print /foo/   ? "Found foo\n" : "No foo here\n";
    print (/foo/) ? "Found foo\n" : "No foo here\n";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://98813]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-04-18 15:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found