in reply to Re: Using 'keys' on a list
in thread Using 'keys' on a list

Also, when the Perl RFC 0001 comes into a stable release, you can write

for my ($key, $value) (f()) { say $key; }

I guess that this will come in 5.36 as experimental feature and hopefully will leave the experimental stage with 5.38.

Replies are listed 'Best First'.
Re^3: Using 'keys' on a list
by Anonymous Monk on Jun 29, 2021 at 22:09 UTC
    And this would have its own iterator?

      Yes, that's the point of this syntax. It wouldn't help for the case of the OP, as the call to f() will still generate the whole list.