This does just as split, it loses every 20th newline. You can make it less complex is you want to keep the delimiter.my @chunks = $string =~ /(?|(?:((?:[^\n]*\n){19}[^\n]*)\n)|((?s:.*)))/ +g;
In reply to Re: Split a string at a given line number
by JavaFan
in thread Split a string at a given line number
by danj35
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |