in reply to The anomalous each()--Part II.

print stringifies %h and so requires iterating over it. That resets the %h iterator for the while loop.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re^2: The anomalous each()--Part II.
by diotalevi (Canon) on Nov 19, 2005 at 20:28 UTC
    No, listifies it. Stringification of a hash is different, happens in scalar context, and is a funny looking string like "2/16".