in reply to Converting Text Files

You might want to check this node for some sample code.

You might also want to look at CPAN modules suggested by earlier posters in the same thread, specifically, CGI.pm, DBD::CSV

If you want something a little bit fancier, XML::CSV might be what you're looking for...
HTH