The stupid question is the question not asked | |
PerlMonks |
Re: Can I determine if the value of a variable is the same as an arrays name?by jreades (Friar) |
on Nov 29, 2000 at 21:16 UTC ( [id://43952]=note: print w/replies, xml ) | Need Help?? |
You can do this using symbolic references, but running under -w or use strict this will often generate a number of warnings. Here's an example:
And this is how it would apply to your problem:
So yes, it's do-able, but it's not always the best programming method although it seems to fit here and wouldn't generate warnings as you've declard the arrays you're trying to assign to and not initializing them on the fly. Originally posted as a Categorized Answer.
In Section
Seekers of Perl Wisdom
|
|