note
tye
<p>
Indeed. I conflated two similar techniques: getting a list of matches from /(...)/g and getting a list of matches from /(...)(...)(...)/. You don't get a list of matches from /(...)*/ (nor from /(...)*/g).
</p><p>
What I should have written was:
</p><c>
my @chunks = $description =~ /\G((?:[^\n]*\n){14}|.+)/gs;
</c><p>
(tested even; works even)
</p><p>
<b>Update:</b> Changed last * to + to eliminate extra empty string in result that I just noticed which is due to "quirk" in Perl regex processing (something I think we should just 'fix', but that is a story for another node, one I've written at least once already).
</p>
<div class="pmsig"><div class="pmsig-22609"><p align="right">
- [tye]<tt> </tt>
</p></div></div>
1006961
1006997