in reply to Array of Arrays with Variable Names
print eval('@'.$string.'[0]');
In your case, I think what you're looking for is something like:
foreach $entry ( @combined ) { my $array = eval('\@'.$entry); }
You can do similar incredibly ugly and horribly unrecommended things with eval, but if it gets the job done, it does ;)
I think you can use map to do something similar (see Perl Best Practices pg. 161 "Avoid string eval") which states this kind of behavior is best avoided.
|
|---|