in reply to Apply function "keys" directly to function returning hash

Howdy!

I got somewhere with keys %{{func()}}

func() returns a list\

{func()} constructs an anonymous hash from that list

%{} around that tries to dereference what is inside it as a hash reference (ending up with the hash keys wants)

keys # take keys of following HASH %{ # dereference HASHREF { # construct HASHREF from list func() # returns list } }

yours,
Michael

Replies are listed 'Best First'.
Re: Re: Apply function "keys" directly to function returning hash
by wirrwarr (Monk) on Aug 25, 2003 at 16:56 UTC
    Oh yes, that's the solution.
    I already tried %{\(func())}, but I always forget that \() is not the same as {}. :(
    Thanks a lot!