On 07/21/2006 03:14 PM, [EMAIL PROTECTED] wrote:
How do I pass an array to a subroutine in a manner that the array is entirely contained in one element of @_, instead of having each element mapped to elements of @_.

for example, inside of the subroutine, I'd like to say @z = @_[0]; and have @z refer to the entire array I passed to the subroutine, rather than just the first element which is the case now.


thanks,
[EMAIL PROTECTED]


Read the manual named "perlsub" (perldoc perlsub). Look at the section titled "Pass by Reference."

That section also refers you to "perldoc perlref." Read (and do the examples) in there too.



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to