firstkey#

Tied-hash iterator: reset and return the first key.

תקציר#

my @keys = keys %Config;            # triggers FIRSTKEY + NEXTKEY
while (my ($k, $v) = each %Config) { ... }

מה מוחזר#

The first key in the internal iteration order, or undef if the hash is empty.

מקרי קצה#

  • Iteration order is unspecified; never rely on it.

  • Calling FIRSTKEY resets a NEXTKEY walk in progress.

הבדלים מן ה-upstream#

Fully compatible with upstream.