in reply to Using 'keys' on a list
keys doesn't operate on a list, it operates on a hash (or an array since 5.12).
You can create a hash, populate it with the list, and get its keys:
my %h = f(); say for keys %h;
You can also just return every second element of the list:
my $i; say for grep ++$i % 2, f();