You may want to look at the Text::CSV perl module. It
already has all the logic built into it to handle CSV (Comma Separated Value)
files automatically. If you want to access the file as
an SQL database, take a look at DBI in conjunction with DBD::CSV.