Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://943957]
help
Chatterbox?
[NetWallah]: /stevieb I dont understand - the poster had a very legitimate issue, and expressed it clearly. WHat did you have a problem with?

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (10)
As of 2017-02-23 14:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (347 votes). Check out past polls.