sub fubar { my %hash = @_; print $hash{key1}, $hash{key2}; } ... fubar(%{$arrayofhashes[$index]});