in reply to parsing lists
at the top of your file.use warnings; use strict;
2) I think you are missing a semicolon at the end of -the "open" line.
UPDATE: Here's some untested code...
use warnings; use strict; $count = 0; open (DISTLISTS, " < rdy.csv") || die "Unable host file for splitting: + $!."; while (<DISTLISTS>) { chomp $dist_split; if ($. % 200 == 0) { # modular arithmetic $count ++; } my $filename = "file$count.csv"; open (OUTPUT1, " >>$filename") print OUTPUT1 "$dist_split\n"; close OUTPUT1; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: parsing lists
by Roy Johnson (Monsignor) on Mar 03, 2005 at 19:00 UTC | |
by tphyahoo (Vicar) on Mar 04, 2005 at 09:31 UTC |