SleepyJay has asked for the wisdom of the Perl Monks concerning the following question:

I have a mysql dump that I want to import using the mysql command 'source file.sql'. However, I just read that is not supported by Perl DBI... sigh.

So, aside from writing my own parser for sql scripts, is there a less painful way?

Note that something like system('mysql < file.sql') works, but it's not an ideal way to capture mysql warnings/errors.

thanks
jason.

Replies are listed 'Best First'.
Re: Perl DBI MySQL source command...
by Anonymous Monk on Oct 22, 2009 at 01:15 UTC

      Now why couldn't I find all of that when I searched? Grr.

      Meh. On second thought, this has not enlightenment anymore than confirming that there is only the two suggestions I already made. Usually when someone says, "I know I can do A and B, but is there a C?" the answer one gets back should probably not be links to discussions about A and B.

      Thanks, though.
      jason.