in reply to hash name from read file

holli is correct, you don't really want to implement it that way, a hash of hases or Array of arrays, etc, would be much more appropriate.

That being said there is a way to do what you want that being inserting your own entry into the symbol table, thusly:

use strict; use warnings; { no strict 'refs'; # Create the 001 hash *{ "main::001" } = { akey => 'avalue', bkey => 'bvalue' }; # alias the 001 hash to some common name *{ "main::thehash" } = *{ "main::001" }; } # show contents of 001 hash while ( my($k,$v) = each(%001) ) { print "$k => $v\n"; } # should be same as above, some monk smarter than I may # be able to tell why the 001 name got imported but not, # thehash into the main:: package. while ( my($k,$v) = each(%main::thehash) ) { print "$k => $v\n"; }

Again let me say this is a sub-optimal solution, an actuall datastructure would serve you better here, and be much more maintainable and readable. This post is knowledge for knowledge's sake.