my %hash; $hash{some_key} = [ $this, $that ]; # [ ... ] creates an anonymous array ref. $hash{other_key} = [ $the, $other ]; # and that is assigned to the hash. foreach my $key ( keys %hash ) { print "key: $key, values: $hash{$key}[0], $hash{$key}[1]\n"; }