in reply to Splitting up lines in a few files

GrandFather already gave you the general-purpose perl answer. If you're on a *NIX, you can use the utility split for this.
split -l 2000 C prefix

will take a file called C and split it into files called prefixaa prefixab prefixac etc., each containing 2000 lines from C. See man split for more details.


Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -- Brian W. Kernighan