in reply to Caller, caller, wherefore art thou, caller?

It's not what you want, but an ordinary hash behaves the same way:

my %h; @h{a..d}=1..4; while (my ($k,$v) = each %h) { last } while (my $k = each %h) { print $k } __END__ abd
The each call for the print loop only finds three keys. You have to manually reset the each iterator if you do not read all pairs or keys. That's typically done with keys %h; in void context.

After Compline,
Zaxo