my @ary03 = (0,0,0,0,0); print join(":",@ary03),"\n"; foreach ${$ary02[3]} (1..3){ $tstary[1] = $idx1; print join(":",@tstary),"\n"; } # this doesn't work with an error of # Can't use string ("0") as a symbol ref while "strict refs" in use # other variations didn't work either # how about $aryeltref = \$ary03[1]; foreach $aryeltref (1..3){ print join(":",(@tstary,$aryeltref)),"\n"; } __OUTPUT__ 0:0:0:0:0:SCALAR(0x2144a28) 0:0:0:0:0:1 0:0:0:0:0:2 0:0:0:0:0:3 # expected but not quite what I had in mind # trying foreach $$aryeltref (1..3) produced a "Not a GLOB reference at ... " which makes me wonder if some mojo with the symbol table might make it work?