The additional currlies clarify which potion is the hash reference, and which part is the key.print("$simpsons{father}\n"); print("$$string{mother}\n"); print("${$array[0]}{son}\n"); print("${$hash{family}}{daughter}\n");
In reply to Re: using other variables as keys to hash
by MZSanford
in thread using other variables as keys to hash
by Ntav
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |