$hash{$key} = \%temphash; # $hash{$key} is a reference to %temphash $hash{$hey} = \@array; # $hash{$key} is a reference to @array $hash{$key} = {KEY => 'value'}; #$hash{$key} is a reference to an anonymous hash $hash{$key} = [1,2,3]; #$hash[$key] is a reference to an anonymous array