Currently, I am spooling the sqlplus command into a text file but even this is causing me problems as I would like to separate the values by commas. So far It has not worked.
I was hoping something like this would work
@test = system('sqlplus un/pw@host @test.sql');
The test.sql file contains three statements all returning numbers. If I could save these to the @test array, this would be great.
Any ideas?
systemdoes not return standard output, it returns the return value of the system call. To capture output use backticks orqx(), but you will need to escape the@characters to avoid interpolation. However, if you are querying a database, you might be better off using the DBI module.