in reply to Re^4: mystery function & Odd number of elements in anonymous hash
in thread mystery function & Odd number of elements in anonymous hash

Why use a wrapper function when Perl already has one?
my $hshref = { foo => scalar(func()), bar => "baz" };
Or, in this case:
my $hshref = { foo => func()[0], bar => "baz" };