in reply to Dynamically naming and creating hashes

a hash is a mapping from a string to a scalar. the symbol table is (simplified) a mapping from a string (the variable name) to the variable.

what you want to do is possible, but why bother with doing complicated things with the symbol table and even do no strict; when you can have a simple hash of hashes?

my @hashNames = qw(testA testB testC); my $i = 0; my %hoh; foreach (@hashNames) { $hoh{$_}->{key} = $i; } # later print $hoh{testA}->{key};

see perldata, perllol