```{index} single: pairkeys; List::Util function ``` ```{index} single: List::Util::pairkeys; Perl function ``` # pairkeys Extract just the keys from an even-sized key/value list. ## Synopsis ```perl my @keys = pairkeys @kvlist; my @keys = pairkeys %hash; ``` ## What you get back A list of every even-indexed element (indices `0`, `2`, `4`, ...). Equivalent to but more efficient than ```perl pairmap { $a } @kvlist ``` ## Examples ```perl my @k = pairkeys one => 1, two => 2; # ('one', 'two') my @k = pairkeys %ENV; # names of every env var ``` ## Differences from upstream Fully compatible with upstream. ## See also - `pairvalues` — the value-side counterpart. - `pairs` — keep keys and values bound together.