Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^4: Surprised by Perl parse of ternary operator

by Anonymous Monk
on Dec 16, 2011 at 15:32 UTC ( #943957=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Surprised by Perl parse of ternary operator
in thread Surprised by Perl parse of ternary operator

Can Ruby or PHP do that?

No, at least Ruby seems to lack a concept of a "variable" lvalue. (foo = bar) = 5 gives a syntax error, and x < mid ? lo : hi = x gets parsed as x < mid ? lo : (hi = x)


Comment on Re^4: Surprised by Perl parse of ternary operator
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://943957]
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: (8)
As of 2014-12-28 04:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (178 votes), past polls