in reply to Split very big string in half

maybe something with index() and substr()

my $splitpoint = index $html[$i], '</html>', 500_000; if( $splitpoint >= 0 ) { my $fragment = substr $html[$i], 0, $splitpoint + length '</html>', +''; ...