Help for this page

Select Code to Download


  1. or download this
    foreach $row (0..$#A){ #array row length
      foreach $col (0 .. ($#{$A[0]} - 1) ) { #array width less one
    ...
      $b->[($row *2) +1][0] = $a->[$row][$#{$A[0]}]; #now copy last
      #there are twice as many rows so we double the row index
    }