XP is just a number | |
PerlMonks |
Re: Changing name of ARRAY in each iterationby Velaki (Chaplain) |
on Aug 10, 2006 at 13:14 UTC ( [id://566607]=note: print w/replies, xml ) | Need Help?? |
It looks like you're trying to dynamically create a new array name, e.g. @energyA, @energyB. You should probably make it a hash of array references.
This way, you'll have %energy, which would contain references to the arrays, for example, $energy{'A'} and $energy{'B'}, etc. Then you could simply dereference them, e.g. @{$energy{'A'}}), to access the elements.
Hope this helped,
"Perl. There is no substitute."
In Section
Seekers of Perl Wisdom
|
|