Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^8: ... for (@_) x= 2; (scalar assignment)

by ikegami (Patriarch)
on Dec 29, 2015 at 20:03 UTC ( [id://1151403]=note: print w/replies, xml ) Need Help??


in reply to Re^7: ... for (@_) x= 2; (scalar assignment)
in thread ... for (@_) x= 2;

Ah, ok.

I know three cases where parens matter (aside from when they override precedence or disambiguate syntax):

  • (...) = ... vs ... = ...
  • (...) x ... vs ... x ...
  • eof vs eof()

I think there's another one.

For the first two, it was either that or create a new operator. No other operators behave differently based on whether one their operand is list-like or not. It's a pity = and x didn't adopt the same definition of list-like, but then again, one expects lvalues and the other expects rvalues.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-19 14:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found