in reply to Why are lines being skipped in output?

Hello! $_ =~ <test>; is your problem. You do not need this line because perl automatically reads a line from the input file(<test> in your case) line into $_. By using $_ =~ <test>, the problem actually reads TWO lines every iteration so every other line will be skipped! It's a good idea to get in the habit of running perl scripts with -w as it will catch warnings for you. -w makes your life easier. Hope this helps Have a nice day
  • Comment on Re: Why are lines being skipped in output?