in reply to Multiple queries on DBI corresponding to multiple csv files?
Welcome to Perl and the Monastery, brother jtech.
I am not happy with the code redundancy.
That you have spotted this and identified it as a problem is a very promising start. Perhaps the first thing to consider is to use subroutines. You can read the details of how to use these in Perl at perlsub. I wouldn't bother going past the first section, "DESCRIPTION" for now. The examples in there should show you the way to go.
There are other things in your script which could be improved (not least that it fails with Can't locate object method "connect" via package "DBI" at 1230078.pl line 9.) but those can certainly wait until the subroutine is in place. Good luck.
|
|---|