perlnoobster has asked for the wisdom of the Perl Monks concerning the following question:
open (CQATEXTFILE, 'test.txt'); my $counter = 0; while (<FILE>) { if ( ++$counter % 5 == 0 ) { @results=split '\t',$results; push (@id,$results[0]); $_ = defined($_) ? $_ : '' for @results; # deal with empty fields $atom{$results[0]}=$results[1]; $category{$results[0]}=$results[2]; $title{$results[0]}=$results[3]; $counter++; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Group every 50 rows
by cheekuperl (Monk) on Jul 18, 2012 at 14:39 UTC | |
|
Re: Group every 50 rows
by aitap (Curate) on Jul 18, 2012 at 15:01 UTC | |
|
Re: Group every 50 rows
by pvaldes (Chaplain) on Jul 18, 2012 at 14:46 UTC | |
|
Re: Group every 50 rows
by BillKSmith (Monsignor) on Jul 18, 2012 at 17:31 UTC | |
|
Re: Group every 50 rows
by locked_user sundialsvc4 (Abbot) on Jul 18, 2012 at 15:31 UTC |