in reply to Re^4: why each/keys/values can't work on slice? (updated)
in thread why each/keys/values can't work on slice?

> > maybe show us an example from another language w/o "this limitation" to learn from? :)

these are not examples from another language demonstrating no "limitations"... :)

anyway in Perl 5.36 you can do this

use v5.36; use warnings; use experimental qw/for_list/; my %hash; @hash{"a".."e"} = 1..5; for my ($key, $value) ( %hash{"c","a","e"} ) { say "$key -> $value"; }

Cheers Rolf
(addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
Wikisyntax for the Monastery