Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

How to split a split a file with N lines into eqaul number of lines.The program should take two arguments one the number of files to be split and other the file itself.Also if the N lines is not evenly divisible with number of files,the earlier files shoudl have one or two more lines.
  • Comment on how to split a file with N lines into equal number of lines files,

Replies are listed 'Best First'.
Re: how to split a file with N lines into equal number of lines files,
by zentara (Cardinal) on Oct 07, 2002 at 18:30 UTC
    Sounds like homework