in reply to Help with problem
A wild guess: Since you reopen FILEOUT to a new file without closing it first, maybe there's an issue with some buffered data ending up in the wrong file? I think perl is usually smart about closing file descriptors in cases like that, but I don't know if you can always count on it. Perhaps you should close it before reopening it.
Aside from that, I'd have to agree with moritz: some issue with testing. Maybe whatever you're using to count the lines in your resulting files doesn't have exactly the same definition for "line" that perl does. Incidentally, there is a perfectly good *nix utility for this kind of thing:
grep -v ^$ inputfile | split -d -l 300000 - outputfile
Aaron B.
Available for small or large Perl jobs; see my home node.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Help with problem
by Marshall (Canon) on May 24, 2012 at 15:49 UTC | |
Re^2: Help with problem (CUTTING TEXT FILES)
by live4tech (Sexton) on May 23, 2012 at 17:17 UTC | |
by aaron_baugher (Curate) on May 23, 2012 at 20:08 UTC | |
by Anonymous Monk on May 24, 2012 at 00:50 UTC |
In Section
Seekers of Perl Wisdom