Part of my current project at work is to take a CSV log file created by an application server, parse it for entries that meet the criteria, and insert them into a Postgres table. In the past I'd read in each line, split it into 30 different variables (only 5 of which I care about) run it through multiple if statements to make sure it's the data I need to store.
I've been reading Programming the Perl DBI [oreilly.com] and had skimmed through the section on DBD::CSV. I quickly wrote up a proof of concept using DBD::CSV and was impressed. Getting the exact data that I wanted out of the log file was much simpler and straightforward with a SQL select compared to all the if statements.
Now to roll this into production.