in reply to Memory Overflow

Some (probably stupid) questions, since I cannot see any obvious problems right away:
  1. How long are the lines in your input file?
  2. Have you set the input record separator ($/) to something not matching your end-of-line string or undef'd it?
  3. Is the <br> line really in your script and should it be?
HTH,
Joost.