in reply to Variable messes up loops.

Please use strict.pm to catch obvious typos and indent your code. For an example of an indentation style you might use you can run your script through perltidy.

I have found through experience that those two steps help people catch a very large portion of their common mistakes. In the event that you don't catch your error, the effort will make it tremendously easier for me (or anyone else) to read your code and offer more specific suggestions.

  • Comment on Re (tilly) 1: Variable messes up loops.