You need to use chomp after you get each line from the file to remove the newline character
In reply to Re: length of 1's by vinoth.ree in thread length of 1's by coldy