in reply to Re: How to make a hash out of two arrays,one with keys and other with values?
in thread How to make a hash out of two arrays,one with keys and other with values?
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)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to make a hash out of two arrays,one with keys and other with values?
by hnd (Scribe) on Jun 30, 2009 at 16:55 UTC |