# Preserves any pre-existing anonymous hashref. @hr = map{ $hr[$_]->{k} = $val[$_] } 0 .. $#hr;