in reply to Apply function "keys" directly to function returning hash
The problem is that you're *not* returning a hash - you're returning a list, which my %hash = func() turns into a hash for you.
Ben.
One way round this would be to return a hashref instead - something like this...
Hope this helps,sub func { return {'a' => 'ah', 'b' => 'be'} }; print keys %{func()}; # a b
Ben.
|
---|
In Section
Seekers of Perl Wisdom