tags:

views:

304

answers:

2

How do I write a Perl Script to read a CSV file first column and Update Oracle table?

cheers

+4  A: 

Take a look at the CPAN modules Class::DBI::Oracle and DBD::CSV, and previous SO questions about working with CSV files.

You can find general tutorials on using DBI on the official Perl site.

If you have a more specific question about working with these modules or a particular algorithm, you should edit your question.

Ether
+3  A: 
  • See DBI and DBD::Oracle database connectivity info.
  • see perlsyn for information on control loops
  • see Text::CSV for info on reading CSV files.
    • Or you could use DBD::CSV to make all your code database oriented.
  • You'll probably also need to read perldata, perlreftut and perldsc.

  • You may want to read about open, readline and split, if you want to write your own CSV parser, even though there are better ones on CPAN.

You can find all the modules I mentioned on CPAN. The functions and man pages I mentioned are available at perldoc.org.

If you are starting from scratch with Perl to do this job, I recommend reading Learning Perl and doing all the exercises. You can find other introductory material at learn.perl.org.

daotoad