P is for Practical | |
PerlMonks |
Re: syntax for hashes with variable in nameby Tux (Canon) |
on Nov 22, 2010 at 15:39 UTC ( [id://872991]=note: print w/replies, xml ) | Need Help?? |
Don't go that road. Please. Done that, been there. It leads to unwanted things, in the widest sense of "unwanted". Really! Symbolic reference (where the name of the hash/array/scalar is in a variable name) can always be made strict and safer by embedding it inside a hash:
=>
Or - even better - go with jethro's suggestion to use multidimensional data structures. Enjoy, Have FUN! H.Merijn
In Section
Seekers of Perl Wisdom
|
|