Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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 lurking in the Monastery: (4)
As of 2021-12-01 17:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (13 votes). Check out past polls.

    Notices?