in reply to Varying Variable Names
DB<3> $q=1
DB<4> eval "\@arr_$q=('eenie','meenie')"
DB<5> x @arr_1
0 'eenie'
1 'meenie'
If you do this, your program may catch fire, burn, and not run under strict... as others have advised you it might happen. Also, why you'd prefer eval other than symrefs is unclear to me.
OTOH, it looks to me that eval is more explicit - if messier - than symrefs... opinions?
Cheers,
alf
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |