$str1="a,b,c";; $str2="1,2,3";; @hash{ split ',',$str1 } = split ',', $str2;; pp \%hash;; { a => 1, b => 2, c => 3 }