in reply to Adding a number from scalar variable to array name
But I tell you, like the others do: Don't do it. There are far better ways to achieve what you want to achieve without creating arrays. Just tell us what the main task is.@numbers = (1,2,3,4); foreach $num (@numbers) { eval("\@store_get$num = ($num)"); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Adding a number from scalar variable to array name
by ikegami (Patriarch) on Sep 08, 2006 at 19:20 UTC | |
by Skeeve (Parson) on Sep 08, 2006 at 20:47 UTC | |
|
Re^2: Adding a number from scalar variable to array name
by Anonymous Monk on Sep 08, 2006 at 19:22 UTC | |
by ikegami (Patriarch) on Sep 08, 2006 at 19:35 UTC | |
by shoesaphone (Novice) on Sep 08, 2006 at 19:50 UTC |