Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: u+ fails to force scalar context to empty list assignment: +( () = ... )

by ikegami (Patriarch)
on Mar 12, 2019 at 06:19 UTC ( [id://1231152]=note: print w/replies, xml ) Need Help??


in reply to u+ fails to force scalar context to empty list assignment: +( () = ... )

Interesting (I expected a compilation error here, similar as with number predecrement, e.g. --5):

A numeric literal doesn't return an lvalue, but an assignment in scalar context returns an lvalue. See Mini-Tutorial: Scalar vs List Assignment Operator.

  • Comment on Re: u+ fails to force scalar context to empty list assignment: +( () = ... )

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2024-04-16 10:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found