Jeff 'japhy' Pinyan wrote:

>On Jan 27, Jan Eden said:
>
>>I have a subroutine which fills into several hashes and arrays
>>(%author_indexlines, %poem_lines, @alphabet_index etc). How can I
>>return those variables and pass them to another subroutine? 

[snip]

>>I thought that this might be achieved returning references to the
>>respective arrays and hashes and dereference them after passing,
>>but since the elements have local scope in the read_index sub, I am
>>not sure if this might work:
>
>You guessed almost correctly.  You still have 'shift', though. 
>shift() will only return ONE element.  Getting all of them from @_
>is the way to do it.
>
Ok. I noticed this problem trying to get it to work and did not rethink the way shift 
works. Thanks!

- Jan
-- 
There's no place like ~/

--
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