<?xml version="1.0" encoding="windows-1252"?>
<node id="1012312" title="Re^2: While Loops" created="2013-01-08 13:58:14" updated="2013-01-08 13:58:14">
<type id="11">
note</type>
<author id="712372">
kennethk</author>
<data>
<field name="doctext">
With the improved spec, you'd want something more like:
&lt;p&gt;&lt;c&gt;#!/usr/bin/perl -w 
use strict;

my @data=();
my $file='c:\text.txt';

open my $fh,"&lt;", $file or die "$file: $!";

while (my $line = &lt;$fh&gt;){
      push @data, $line;
      if (@data == 100) {
            print @data;
            @data = ();
      }
}

print @data;
&lt;/c&gt;
&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-712372"&gt;
&lt;hr /&gt;
&lt;p&gt;#11929 First ask yourself `How would I do this without a computer?'  Then have the computer do it the same way.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
1012306</field>
<field name="parent_node">
1012310</field>
</data>
</node>
