my @col1 = qw /A B C/; my $otherColumns = [ [ 1, 2, 3], [4, 5, 6] ]; my @rows; foreach my $i ( 0 .. $#col1) { push @rows, [ $col[$i], map { $_->[$i] } @$otherColumns ]; }