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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Derive a variable name from a variable?
by LanX (Sage) on Dec 21, 2015 at 15:51 UTC | |
Re^2: Derive a variable name from a variable?
by mavericknik (Sexton) on Dec 18, 2015 at 21:25 UTC | |
by Lennotoecom (Pilgrim) on Dec 21, 2015 at 06:08 UTC |
In Section
Seekers of Perl Wisdom