in reply to Text::Table w/ newlines

tye's mapcar solution is pretty elegant. Here's what I came up with to preprocess the list of rows before sending to Text::Table:
my @lines = ( [ 1, '...', '...', '...', '...' ], [ 2, '...', "NA\nEU\nThird line", "Emp\nEx-emp", "Active\nInactive" +], [ 3, '...', '...', '...', '...' ] ); for (my $l = 0; $l < @lines; $l++) { next unless grep /\n/, @{ $lines[$l] }; splice @lines, $l+1, 0, []; ($lines[$l][$_], $lines[$l+1][$_]) = split /\n/, $lines[$l][$_], 2 for 0 .. $#{ $lines[$l] }; } use Data::Dumper; print Dumper \@lines;
(A good example of why sometimes a C-style for loop is needed) Looks like Text::Table converts undef entries to empty string, so you don't need to do anything special to the undefs after the split.

blokhead