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


in reply to Re: returning a hash from a module
in thread returning a hash from a module

Actually, return will return a list, scalar or void depending on the context of the expression after the return statement. So if you return a hash it will flatten it to a list. If there is an assignment of the return value into a hash then the list is put into the hash. Same with arrays.