in reply to Hash references?

Use a hash of hashes instead:
my %hoh; my $foo = "bar"; $hoh{$foo} = { "key1"=>"value1","key2"=>"value2" }; print $hoh{$foo}{"key1"}; print $hoh{bar}{"key1"}; # same thing


Unless I state otherwise, all my code runs with strict and warnings