in reply to Combining two lists into a hash

You can't get much more perlish than depending on the internal representation of hashes...

instead of the for loop:

my @temp = (); while (@a) { push @temp, shift @a, shift @b } %result = @temp;

Replies are listed 'Best First'.
Re^2: Combining two lists into a hash
by revdiablo (Prior) on May 03, 2005 at 22:14 UTC

    This does not depend on the internal representation of a hash. It simply takes advantage of the fact that a list can be coerced into a hash. That is documented behavior, not internal representation.