http://www.perlmonks.org?node_id=1008290


in reply to better array to hash conversion

@hash{@array}=(0..$#hash};

Should really read

@hash{@array}=(0..$#array};

Thanks for the catch, perltux!

Replies are listed 'Best First'.
Re^2: better array to hash conversion
by perltux (Monk) on Dec 11, 2012 at 12:48 UTC
    Shouldn't that be $#array rather than $#hash ?

      Absolutely!