in reply to Re: Learning to use "each"
in thread Learning to use "each"

Explaination:
That prints 'one' twice. It's iterating over the return value of each, so over a single $key, $value pair, printing the value of $key twice.

Replies are listed 'Best First'.
Re^3: Learning to use "each"
by toolic (Bishop) on Apr 28, 2011 at 19:19 UTC
    I don't think that's what the OP wants.
    I think you misunderstood my post. I simply ran the OP's foreach code through the deparser to show how perl interprets the code. I simply showed the output of the OP's deparsed code. I did not suggest any new code.
      Yes, I realized and updated my post before you finished replying.