メモ。
$hash = { "ほげ" => 10, "ふが" => 5, "ぴき" => 30 };
for my $key (sort { $hash->{$b} <=> $hash->{$a} } keys %$hash) {
print $key, ",", $hash->{$key}, "\n";
}
メモ。
$hash = { "ほげ" => 10, "ふが" => 5, "ぴき" => 30 };
for my $key (sort { $hash->{$b} <=> $hash->{$a} } keys %$hash) {
print $key, ",", $hash->{$key}, "\n";
}