in reply to parsing lists
Something like this? (UNTESTED):
my $count = 0; my $outfile = 'A'; open DISTLISTS, '<', 'rdy.csv' or die "Unable to host file for splitting: $!\n"; while my $dist_split ( <DISTLISTS> ) { if( $count % 200 == 0 ) { close OUTFILE unless $count == 0; open OUTFILE, '>', $outfile . '.csv' or die "Couldn't open output file: $!\n"; $outfile++; } print OUTFILE $dist_split; $count++; } close OUTFILE or die "Bleah! $!\n"; close DISTLISTS;
I haven't tested this, but it should get you going down a road that will lead to a workable solution.
Dave
|
|---|