in reply to Importing MySQL dump file remotely

If you have a real MySQLDump file, the easy way is to just set $/ = ";\n";, because mysqldump will never output a newline as SQL data. It will output CREATE TABLE statements over multiple lines, but these will end with a semicolon as well.

If you need to do some munging, do it after having splitted...