Commander Salamander has asked for the wisdom of the Perl Monks concerning the following question:
$name = 'hash1' $key = 'key1' $keyvalue = 'keyvalue1'
How would I write the equivalent of the line below using the variables (i.e. something like: %($name)<br>=$key=>$keyvalue )
Thanks!%hash1 = key1=>'keyvalue1'
janitored by ybiC: Minor format cleanup, including balanced <code> tags around code snippets
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Beginners question: assigning a variable as the name of a hash
by ikegami (Patriarch) on Apr 22, 2005 at 19:41 UTC | |
|
Re: Beginners question: assigning a variable as the name of a hash
by dragonchild (Archbishop) on Apr 22, 2005 at 19:44 UTC | |
by japhy (Canon) on Apr 22, 2005 at 21:44 UTC | |
|
Re: Beginners question: assigning a variable as the name of a hash
by tlm (Prior) on Apr 22, 2005 at 19:48 UTC |