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.