#!/usr/bin/perl %hash = (key1=>1, key2=>2, key3=>3); foreach (keys(%hash)) { print; print "\n"; } foreach (values(%hash)) { print; print "\n"; } ----------------- keys は key2 key1 key3 ---- values は 2 1 3