in reply to Re: Re: Splitting long file
in thread Splitting long file

It does work because I have not chomped the line.

However the second open is in the wrong place:

### WRONG ### while (<BIG>) { open OUT, ">outfile_" .$i++; if ( m/^\$\n$/ ) { ### CORRECT ### open OUT, ">outfile_" .$i++; while (<BIG>) { if ( m/^\$\n$/ ) {

--tidiness is the memory loss of environmental mnemonics