pairvalues#
Extract just the values from an even-sized key/value list.
Synopsis#
my @values = pairvalues @kvlist;
my @values = pairvalues %hash;
What you get back#
A list of every odd-indexed element (indices 1, 3, 5, …).
If the input has an orphan key at the end, its corresponding value
is undef. Equivalent to but more efficient than
pairmap { $b } @kvlist
Examples#
my @v = pairvalues one => 1, two => 2; # (1, 2)
my @v = pairvalues %ENV; # values of every env var
Differences from upstream#
Fully compatible with upstream.
See also#
pairkeys— the key-side counterpart.pairs— keep keys and values bound together.