Though it might "feel" simpler to stick to Perl and use DBI, for the database in question the approach of going out to the system is likely the cleanest, safest and fastest.
In a nutshell, what he is trying to do is:
dbinit my_new_db.db
dbunload my_old_db <<- this creates a file called "reload.sql"
dbisql my_new_db.db read reload.sql
throw in some error checking (exit codes, file/directory exists, etc...) and you've got a great rebuild/upgrade mechanism.
I've done exactly this in Perl, Bash/Sh, and .CMD/.BAT.