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?

No - that does not work.

You need =>     , not =

. Also, the preferred sigil for array element in perl5 is $.

my %hash=map {$array1[$_]=>$array2[$_]} 0..$#array1;
(Identical to ikegami's posting.)

     Potentia vobiscum ! (Si hoc legere scis nimium eruditionis habes)

  • Comment on Re^2: How to make a hash out of two arrays,one with keys and other with values?
  • Download Code

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
    really sorry.........
    i overlooked it.....