in reply to Why are lines being skipped in output?

You are running <> operator twice per loop. You can loop through every line of a file and gather the input of the line in one statement: while($variable = <test>) In your case you are using $_ as your variable. While this helps readability, it is not necessary, as while(<test>) will automatically assign $_ to the value of the next line in the file. So, because <test> is running twice per loop (once in the while condition and then again right beneath it) two lines of text are being pulled each time the loop runs causing the loop to appear to skip a line.
  • Comment on Re: Why are lines being skipped in output?