If you want to update the original data just change the my @results = to @AoA =. Also you could use Scalar::Util::first there instead of grep if you're looking for an optimal solution.use Data::Dumper; ## your @AoA here ... my @results = map { grep(/\n/, @$_) ? map([split "\n"], @$_) : $_ } @AoA; print Dumper( \@results );
_________
broquaint
In reply to Re: Splitting multiline scalars into different array entries
by broquaint
in thread Splitting multiline scalars into different array entries
by davis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |