#This is with map as both arrays are of same length %hashofarray = map { $array1[$_] => $array2[$_] }0..$#array1; #This is a way to use arrays for building hash @hashofarray{@array1} = @array2;
In reply to Re: mapping two arrays into a hash
by OM_Zen
in thread mapping two arrays into a hash
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |