in reply to Beginners question: assigning a variable as the name of a hash

You don't want to name your variables with strings contained in other variables. It sounds like you want a hash of hashes.
my %datastore; $datastore{ $name }{ $key } = $keyvalue;

Update: Fixed typo as per japhy's reply.

  • Comment on Re: Beginners question: assigning a variable as the name of a hash
  • Download Code

Replies are listed 'Best First'.
Re^2: Beginners question: assigning a variable as the name of a hash
by japhy (Canon) on Apr 22, 2005 at 21:44 UTC
    You meant my %datastore;.
    _____________________________________________________
    Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
    How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart