programming-examples/perl/Hash/Sort values in a hash.pl
2019-11-15 12:59:38 +01:00

7 lines
141 B
Perl

$hash{fruit} = apple;
$hash{sandwich} = hamburger;
$hash{drink} = bubbly;
foreach $value (sort values %hash) {
print "$value\n";
}