You need => , not =
. Also, the preferred sigil for array element in perl5 is $.
(Identical to ikegami's posting.)my %hash=map {$array1[$_]=>$array2[$_]} 0..$#array1;
Potentia vobiscum ! (Si hoc legere scis nimium eruditionis habes)
In reply to Re^2: How to make a hash out of two arrays,one with keys and other with values?
by NetWallah
in thread How to make a hash out of two arrays,one with keys and other with values?
by sun@icgeb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |