in reply to Re^2: A brain twister? (how to make 2 lines->1)
in thread A brain twister? (how to make 2 lines->1)

How about

while (my ($key, $value) = each %hash) {...}

See each for details. The example is directly from the documentation.

--MidLifeXis