Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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

by LanX (Archbishop)
on Dec 29, 2015 at 14:20 UTC ( #1151358=note: print w/replies, xml ) Need Help??


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

> I tried compare three of my codes

sorry?

> x= seems doing the same in all three cases - it asks @_ to be a scalar.

which is correct and documented.

Anyway it might be an implementation flow that you sometimes don't get a warning or compilation error, but not a very serious one.

I don't see the point discussing it further, since you have plenty of possibilities to achieve your goal in a much saner way.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2019-06-26 21:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Is there a future for codeless software?



    Results (111 votes). Check out past polls.

    Notices?