in reply to Re^2: Mysql templates
in thread Mysql templates
In general, you just need to split the template on semicolons (though there is the obvious -- though perhaps unlikely -- risk that a semicolon might appear as data within one of the operations, meaning you have to be careful about how you do the split.
If the files are consistently formatted as you showed in this brief example (each distinct operation / statement is on a separate line, so that statements are separated by ";\n"), then splitting is much simpler -- you could even set your input record separator like this: $/ = ";\n"; so that you read one statement at a time from the template, check what sort of statement it is, and pass it to the appropriate DBI method.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Mysql templates
by red-beard (Scribe) on Nov 09, 2005 at 18:53 UTC |