pairkeys#
Extract just the keys from an even-sized key/value list.
תקציר#
my @keys = pairkeys @kvlist;
my @keys = pairkeys %hash;
מה מוחזר#
A list of every even-indexed element (indices 0, 2, 4, …). Equivalent to but more efficient than
pairmap { $a } @kvlist
דוגמאות#
my @k = pairkeys one => 1, two => 2; # ('one', 'two')
my @k = pairkeys %ENV; # names of every env var
הבדלים מן ה-upstream#
Fully compatible with upstream.
ראו גם#
pairvalues- the value-side counterpart.pairs- keep keys and values bound together.