... test: expr(s) /^\Z/ { my %hash; @hash{keys %$_} = values %$_ for @{$item{"expr(s)"}}; return \%hash; } ... #### $HASH1 = { x => 1, y => 2, z => 3 };