change this while ( $temp_line = <INFILE> ) to this while ( <INFILE> ) and it will work.
Also, note that if you want the filenames to be generated as MyFileName00* you'll have to drop the path from your $filename variable.
In reply to Re^3: split one file into many on finding a new line
by kubrat
in thread split one file into many on finding a new line
by smarter_aries
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |