It did take a while, but I finally got it. The || creates boolean, i.e. scalar context. And each() in scalar context returns only the key and not the index.
In reply to Re^5: Using 'each' to get random (key, value) pair from hash returns "uninitialized value"
by jethro
in thread Using 'each' to get random (key, value) pair from hash returns "uninitialized value"
by puterboy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |