in reply to Re^2: Recoding a multi-sql-statement storedProc transaction in a script
in thread Recoding a multi-sql-statement storedProc transaction in a script

A shortcut for a prepare/execute pair is the do method, which will save you some typing.

If you can figure out a way to take your original block of code and turn it into seperate SQL statements, Perl is quite good at that sort of thing. For example if statements are seperated by blank lines or semicolons, you could use split to get the list of statements to execute.