#!/usr/bin/perl use warnings; use strict; my %foo_hash = qw/elmer fudd slyvester cat/; my %bar_hash = qw/bugs bunny tweety bird/; foo(\%foo_hash,\%bar_hash); sub foo { my ($hash1,$hash2) = @_; foreach (keys %$hash1) { print "$_ $$hash1{$_}\n"; } foreach (keys %$hash2) { print "$_ $$hash2{$_}\n"; } } #### grep> cd pub grep> more beer