in reply to multiple files and hashed

You can assign a hash ref to a glob to create a hash in the local namespace...
my $name = 'foo'; *{$name} = { a => 1, b => 2}; print "$foo{b}\n";
or you could even use eval...

I would suggest not doing either and just using a multilevel hash, with the first key being the name you wanted the hash to be, so... $big_hash{$hash_name}{$ref_id} if you can do this your life will be much easier, though I realize there are reason sometimes you want specific veriable names defined. Avoid if possible.

You may need a no strict; around it if you are using strict.

Update I just thought you could actually have the best of both worlds (i.e. not doing namespace mangling AND having different variable names) if you have a finite number of variables. Then you could create the variables, store references to them in a hash, then assign values to the refs, as so...

my(%h1,%h2,%h3); my %lookup = ( 1 => \%h1, foo => \%h2, c => \%h3 ); $which_hash = 'foo'; $lookup->{$which_hash}{test} = 'value'; $h2{test} eq 'value';
much cleaner. Though having a hash of hashes or an array of hashes is in some ways better, giving you the ability to iterate through them all, not to mention just all around cleaner.

                - Ant
                - Some of my best work - (1 2 3)