Help for this page

Select Code to Download


  1. or download this
    my @array;
    while (<DATA>) { last if /^d/ } #discard until the first match
    ...
       }
       push @array, $_;
    }
    
  2. or download this
    my $data  = join('',<DATA>);
    my @chunk = split(/^\d/m, $data);
    
    foreach (@chunk) { process_array( split(/\n/s, $_) ) }