Wouldn't it be nicer to have the number you want to tack on to a name be an actual array index? This gives you an Array-of-Arrays in a compact way:
Now, $arr_new[7] is a reference to what your old @arr_new7 would have been.my @arr_new = map { # generate $something2add from $_ [$something2add]; } @arr_name;
After Compline,
Zaxo
In reply to Re: Varying Variable Names
by Zaxo
in thread Varying Variable Names
by willick
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |