in reply to Re: Working with text files, thinking my issue is with variables inside if loops
in thread Working with text files, thinking my issue is with variables inside if loops

Don't forget to add a "\n" when you print the message to the file! You have chomped the original "\n"!

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Replies are listed 'Best First'.
Re^3: Working with text files, thinking my issue is with variables inside if loops
by dasgar (Priest) on May 24, 2011 at 13:29 UTC

    Good catch! Since I usually don't use variables for filehandles in the code that I write, I got a little too focused on the filehandles and overlooked that detail.