in reply to Derive a variable name from a variable?
there is another way,
but that is a path to the dark side of the force
there might be some jedi,
who'd tell you that it's wrong
they just want you to obey their will
but that is a path to the dark side of the force
@names = qw/adam jake john betty/; @adambooks = qw/ad_1 ad_2/; @jakebooks = qw/ja_1 ja_2/; for $n (@names){ print "$n:\n"; print "\t@{$_}\n" for $n."books"; }
there might be some jedi,
who'd tell you that it's wrong
they just want you to obey their will
In Section
Seekers of Perl Wisdom