Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Operator Precedence

by tachyon (Chancellor)
on Jul 22, 2001 at 16:45 UTC ( #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? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2023-03-26 22:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (63 votes). Check out past polls.

    Notices?