Sorry about the indentation.. trying so many different things at the moment and it got messy. Yes I dont plan to append to the output file just yet. But given I got more than ten or more lines when I printed out "$email" to screen, I would of expected the same to be on the file I had written.