in reply to Writing into a csv

Those are three problems 1) extracting data from html and 2) parsing fixed width data 3) outputting data as csv

moritz already pointed you to the cousin of How do I post a question effectively?

There are a lot of threads on extracting data from html, its a Frequently Asked Question

There are a lot of threads on inputting or outputting CSV, its a Frequently Asked Question

See Text::CSV / Text::xSV, extract data from html with xpath, parsing fixed width data files

Now you have examples for all 3 tasks, go write some code :)

Another essay on effective question asking is http://sscce.org/ - Short, Self Contained, Correct Example