I am looking for a way to implement MySQL and Perl to make a program. Where I’m lost is that I have a .sql file, that creates 3 tables for the Perl program to use. How do you:
1) Execute the file fileName.sql in Perl to create the tables
2) Link those created tables into manipulable variables in Perl Program (like an example being able to add a user to one of the tables)
In Perl you use the DBI database interface. In your case, you will also be using something like the
DBD::MySQLdriver.There is lots of help available on this topic (including lots of questions on this site).
As for the specific question of your .sql file, there are a few approaches you could take, depending on how fancy you want to get:
system()).SQL::Scripton CPAN, which looks useful, though I don’t have any experience with it).I suggest you pick an approach, try it, and ask if you have any specific problems.