in reply to Writing into a csv
An appropriate web site is PerlMonks, right along with the question, the sample code, broken output and expected output.