in reply to Perl script to read a tab delimited text file
I think you might be looking for something similar to this:
while ( <DAT> ) { my @line = split( /\t/, $_ ); while ( @line ) { my @four_records = splice( @line, 0, 4 ); # think "4 x shift( +@line )" push @array_of_arrays, [ @four_records ]; # make this an array + containing an array of four elements in each array slot. } }
Cheerio, Sören
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Perl script to read a tab delimited text file
by Happy-the-monk (Canon) on Apr 01, 2004 at 13:30 UTC |