http://qs1969.pair.com?node_id=481171


in reply to Splitting multiline scalars into different array entries

I'm not 100% sure what you need, but assuming you need what I think you need .. :) .., replacing your loop with this works:
foreach my $row (@AoA) { my @foo = map { split /\n/ } @$row; for( my $i = 0; $i < $#foo; $i += $width ) { push @new_rows, [ @foo[ $i .. -1 + $i + $width ] ]; } }
This outputs:

$VAR1 = [ [ 'single', 'cell', 'values' ], [ 'are', 'really', 'easy' ], [ 'but', 'multiline', 'stilton' ], [ 'these', 'cells', 'is' ], [ 'aren\'t', 'suck', 'great' ], [ 'back', 'to', 'life' ], [ 'back', 'to', 'reality' ], [ 'with', 'more', 'cells' ] ];

Any use to you?