On Mon, 28 Nov 2016 01:21:43 -0800, kentfredric@gmail.com wrote: > If we take a different tack and propose, instead of some arcane magic, > that we define a new keyword, > > > for_idx > > That can take *two* variables: > > for_idx my $key, $value ( @array ) { > ... > } > > Then we get the benefit of explicitness, the benefit of clarity, and > the benefit of > working even in evals. You also get the benefit that *you already have this*: while (my($key, $value) = each @array) { ... } I'm guessing (wildly) that when the "experimental each on scalar" deprecation advances to removal, we could consider extending each() to lists to support: while (my($key, $value) = each(1, 2, @many)) { ... } Hugo --- via perlbug: queue: perl5 status: open https://rt.perl.org/Ticket/Display.html?id=130038Thread Previous | Thread Next