my %hash = ( 'a' => 1, 'b' => 2, 'c' => 3); foreach (keys %hash) { print "$_ => $hash{$_}\n"; }