<?xml version="1.0" encoding="windows-1252"?>
<node id="1006966" title="Re: Split string after 14 Line Feeds?" created="2012-12-03 18:47:25" updated="2012-12-03 18:47:25">
<type id="11">
note</type>
<author id="401112">
johngg</author>
<data>
<field name="doctext">
&lt;p&gt;Another way would be to accumulate the chunks as you read the file.&lt;/p&gt;
&lt;code&gt;
$ for i in `seq 1 13`; do echo Line $i; done | perl -e '
while ( not eof STDIN )
{
    my $buf;
    $buf .= $_ for map { eof STDIN ? () : scalar &lt;&gt; } 1 .. 5;
    print $buf;
    print q{+} x 10, qq{\n};
}'
Line 1
Line 2
Line 3
Line 4
Line 5
++++++++++
Line 6
Line 7
Line 8
Line 9
Line 10
++++++++++
Line 11
Line 12
Line 13
++++++++++
$
&lt;/code&gt;
&lt;p&gt;I hope this is of interest.&lt;/p&gt;
&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-401112"&gt;
&lt;p&gt;Cheers,&lt;/p&gt;&lt;p&gt;JohnGG&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
1006961</field>
<field name="parent_node">
1006961</field>
</data>
</node>
