Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Accessing Arguments inside Subroutines via @_

by LanX (Saint)
on Mar 20, 2015 at 03:07 UTC ( [id://1120690]=note: print w/replies, xml ) Need Help??


in reply to Re: Accessing Arguments inside Subroutines via @_
in thread Accessing Arguments inside Subroutines via @_

> I would be interested to know what motivated the design decision behind it.

I think it follows the normal inner mechanism.

The elements are aliases not the array holding them.

Think about how shift @_ deletes an alias.

One might argue that the array should not be writable, but its sometimes necessary to rewrite @_ before doing a goto &sub .

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)

PS: Je suis Charlie!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-26 03:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found