I'm going to take a wild guess and say that that script is not a shell script, right? What database are you using? That script actually looks like a session from a database client, like the MySQL client "mysql>", or the Oracle client "sqlplus>", or the PostgreSQL client "psql>". Are you sure you just want to know how to run that "script" from Perl?
Forget about Perl for the moment and using Perl to execute that "script" - how do you execute that "script" now?
Comment on Re: (3) Waiting for an SQL script to finish
Right, it is not a shell script. Simply a text file called something.sql. I am using the Oracle client to write/run the script. However, the script gets run as it is right now on a Unix platform through crons. We are moving an app over to Microsoft, the perl script I am trying to write will be scheduled through the SQL Server.