#! perl -w %a = (qw{ good orange bad apple} ); TEST(%a); sub TEST{ my %h = $_[0]; foreach (keys %h){ print $_; } }