in reply to get a reference implicitly within a subroutine call?
Because the assignment copies the values, this also has the eff +ect of turning call-by-reference into call-by-value. Otherwise a func +tion is free to do in-place modifications of @_ and change its caller's + values. upcase_in($v1, $v2); # this changes $v1 and $v2 sub upcase_in { for (@_) { tr/a-z/A-Z/ } }
Of course you can take a reference to any value in @_ , but you were asking for modifying the caller's value, if I get it right.
greets,
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|