Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Array reference problemby davorg (Chancellor) |
on Jul 07, 2009 at 16:16 UTC ( [id://777925]=note: print w/replies, xml ) | Need Help?? |
I am working with a program in which some arrays must be accessed based on their names. You really don't want to do that. No, I mean you really don't want to do that. use strict makes symbolic references illegal for a reason. There are a tiny number of advanced techniques where you need to use symbolic references. This isn't one of them. In this case, what you really want is a hash.
If you alter your code to use a model like this then you'll be far happier. perldsc will probably be useful to you.
In Section
Seekers of Perl Wisdom
|
|