use constant foo qw(a b c); @a = $h{foo()} #### use constant foo [qw(a b c)]; @a = $h{@{foo()}}