in reply to Re: Re: Forcing Array Context
in thread Forcing Array Context

I suggest you take a look at the tutorials broquaint suggested; this should all become less mysterious. As for your question, the same principle applies as above: if you've got a reference in $ref put the sigil for the relevant type before it to dereference it. You'll get something like %$ref, @$ref, $$ref.

my $hierarchy = get_hierarchy(@dirs); while ( my ( $directory, $contents ) = each %$hierarchy ) { ... # do your thing here }

ViceRaid