This isn't tricky, it just takes into account that the first map doing the split will create more elements and then the next map just appends newlines to everything it gets.
@result = map "$_\n", map split, @file;In reply to Re: using map and anonymous subroutines
by diotalevi
in thread using map and anonymous subroutines
by ritontor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |