more useful options | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Sorry I already wanted to nitpick when GotToBTru mentioned this terminology. :)
Technically all calls in Perl are call-by-reference , cause @_ holds so called aliases (implicitly) But copying from @_ makes most Perl routines de facto act like call-by-value . So what the OP does is a simulated call by value where the value is an explicit reference. I feel the need to clarify this cause the terminology is older than Perl and meant to describe languages without explicit ref type. ;) These concepts are meant to describe differences between languages not Perl features. For instance JS has a mix of both:
editShould be noted that JS doesn't have an explicit ref operator. Concepts in "quotes" only translate roughly and would need deeper explanation.
Cheers Rolf (addicted to the Perl Programming Language and ☆☆☆☆ :) In reply to Re^2: Global variable unexpectedly modified when passed by reference (terminology)
by LanX
|
|