I have some CSV files, and I need to make an HTML report out of them...

I have made up the structure of the HTML files, but Im not too sure on how to read up all the information from the CSV files...

The files are tab delimited, and I basically just need to know the following:

Reading information from CSV files into Variables
Outputting variables to HTML/TXT files

Anyone able to help me out here? I tried googling it, but all I keep finding are ASP.NET solutions :-/