my $hshref = { foo => scalar(func()), bar => "baz" }; #### my $hshref = { foo => func()[0], bar => "baz" };