in reply to dynamically creating variables named after the contents of an array
"variable variables" is definitely the wrong way to go in Perl. It can be done (Perl can do nearly anything), but your maintenance programmer will hunt you down and kill you.
As others have suggested in this thread, a hash of arrayrefs is the way to go.
Do not pollute metadata (variable names) with user data (values). Ever.
-- Randal L. Schwartz, Perl hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: •Re: dynamically creating variables named after the contents of an array
by ignatz (Vicar) on Sep 06, 2002 at 19:22 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |