in reply to return multiple hashes from a sub

You need to read about references,
but heres the answer ...
my ($hash1, $hash2) = &build_hashes; foreach (keys (%{$hash1})) { print $_, ":", $hash1->{$_}, "\n"; } # end-foreach foreach (keys (%{$hash2})) { print $_, ":", $hash2->{$_}, "\n"; } # end-foreach sub build_hashes { my %hash1 = ( 1=>"foo1", 2=>"bar1" ); my %hash2 = ( 3=>"foo2", 4=>"bar2" ); return (\%hash1, \%hash2); } # end-sub exit;



Im so sick of my Signature...