in reply to Re: Re: Re: Re: Returning multiple values from a function
in thread Returning multiple values from a function

I haven't found this to be so, unless perl is taking care of the reconstruction for me. I returned a hash like so return %results; and the calling hash was populated correctly. I was able to do a foreach over each of the keys i had set. Perl is taking care of the reconstruction correct?

Yes, Perl takes care of that for you. The sub returns a list of values from the hash, and the assignment turns that list back into a hash. (You could return a hash, and assign to an array, you'd then get an array containing the keys and values of the hash, alternated.)

That make any sense?

C.

  • Comment on Re: Re: Re: Re: Re: Returning multiple values from a function