in reply to for_list and sorting key/value hash pairs
for_list is certainly useful, and even for arrays. But in this case it's reasonably clear, and more concise to just use traditional pre-5.36 Perl.
my %h = map { $_, rand } 'a'..'z'; print "$_ => $h{$_}\n" for sort keys %h;
Dave
|
---|