From what I've found in benchmarks, a positive look-ahead
assertion:
$match =~ /($start .*?) (?=$start)/xs;
is just a HAIR slower than a negative look-ahead assertion:
$match =~ /($start (?: (?! $start ) .)*)/xs;
The first one matches as little from $start as it can until
it's followed by $start again. That would actually FAIL for
the last record. I'd suggest changing it to
$match =~ /($start .*?) (?= $start | \Z)/xs;
Where \Z is the absolute-end-of-string anchor. The second
one matches from $start as much as possible that isn't
$start again.
And I'd like to set the record straight on /s and /m (even
though perlre does a good job). The /s modifier ONLY means
that the . regex character matches EVERY character (including
\n, which it usually doesn't). The /m modifier means that
^ matches the real beginning of a string, or immediately
after a \n, and that $ matches immediately before a newline,
or at the real end of a string. Normally, the ^ anchor only
matches at the REAL beginning of a string, and the $ anchor
only matches the REAL end of a string, or immediately before
a newline at the REAL end of a string. When using /m, the
\A anchor matches the REAL beginning of the string, and the
\Z anchor matches the REAL end of the string.