I'd probably use Text::CSV_XS for reading the input and Template to output the HTML table.
I usually keep an array of values plus coordinates of cells to highlight, so I can also output a plain text table with colour highlighting, using Text::Table and Term::ANSIColor.