mavericknik has asked for the wisdom of the Perl Monks concerning the following question:
And for each name, I have a corresponding array,my @names = qw(adam jake john betty);
Now I'm trying to do:my @adambooks; my @jakebooks; . . .
What is the easiest way to get the value of "Their corresponding array"?? I expect the answer is simple buy I'm pretty new to perl and cant for the life of me figure it out. Any pointers are greatly appreciated!foreach (@names) { my $cur_name = $_; &modify($cur_name, "Their correspinding array") }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Derive a variable name from a variable?
by GrandFather (Saint) on Dec 17, 2015 at 06:41 UTC | |
by mavericknik (Sexton) on Dec 18, 2015 at 21:22 UTC | |
|
Re: Derive a variable name from a variable?
by Laurent_R (Canon) on Dec 17, 2015 at 07:18 UTC | |
|
Re: Derive a variable name from a variable?
by Anonymous Monk on Dec 17, 2015 at 04:46 UTC | |
|
Re: Derive a variable name from a variable?
by Lennotoecom (Pilgrim) on Dec 17, 2015 at 06:47 UTC | |
by LanX (Saint) on Dec 21, 2015 at 15:51 UTC | |
by mavericknik (Sexton) on Dec 18, 2015 at 21:25 UTC | |
by Lennotoecom (Pilgrim) on Dec 21, 2015 at 06:08 UTC |