Need help on executing the BTEQ commands through PERL script

Hican anyone get me the way in which the BTEQ script/commands to be executed through the PERL script.

My requirement is,

In a file I'm having a set of SQL queries for TERADATA. I need to run it in TD at a time.It'll give no. of answer sets & those sets are to exported to a file(same file).For that I'm writing a perl script, but I don't how to execute those queries in perl.

Re: Need help on executing the BTEQ commands through PERL script

If your perl script can call out to an OS command, then you can execute bteq script. However, if you are just trying to get some result sets from teradata using bteq and export the results to files, use the "export" command in bteq and perl is not needed, just do bteq < my_queries.txt in Unix or windows prompt.