#!/usr/bin/perl %hash = qw(first David last Sherrill job Professor); foreach $i (keys(%hash)) { # note: below we do $hash not %hash print "The key is $i and the value is $hash{$i}\n"; } # The key is first and the value is David # The key is last and the value is Sherrill # The key is job and the value is Professor