http://www.perlmonks.org?node_id=908092


in reply to Re: subroutine reference parameters
in thread subroutine reference parameters

Hi,

You posted a link to the documentation for 'each'. Perhaps you should re-read it! When called in scalar context, the function returns a key. When called in list context, it returns a key-value pair.

Replies are listed 'Best First'.
Re^3: subroutine reference parameters
by choroba (Cardinal) on Jun 04, 2011 at 09:54 UTC
    OK, but ($key) = is not scalar context.