Solved - but is there a neater way? Array slices? zforeach $row (0..$#A){ #array row length foreach $col (0 .. ($#{$A[0]} - 1) ) { #array width less one $b->[$row*2][$col] = $a->[$row][$col]; # copy all but last ele ove +r } $b->[($row *2) +1][0] = $a->[$row][$#{$A[0]}]; #now copy last #there are twice as many rows so we double the row index }
In reply to array confusion by zerocred
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |