in reply to Run one perl script from another?
If your text file is just a few (hundred) records, you might not notice the speed difference, but if it runs into the many thousands of records, the 10-to-1 or worse wall clock ratio (DBI inserts vs. bulk insert using the right tool) will be significant. This is equally true for mysql, oracle, postgres, etc.
Regardless of the number of records involved, you'll spend a lot less time programming, and it will be a lot easier to get right.
(If you don't have shell access, but are using mysql, it is still likely to be easier/better to upload a properly formatted version of the text file and use "LOAD DATA INFILE ...", rather than a do bunch of DBI inserts.)
|
|---|