$fam_old{'tool'} = {map{$_=>1}@terms}; $VAR1 = { 'tool' => { 'Son' => 1, 'Wife' => 1, 'Mom' => 1, 'Daughter' => 1 } };