I use open / print to execute an SQL statement using sqlplus, for example:
open (PLSQL, "|sqlplus -s $db_url"); print PLSQL <<ENDSQL; ... some SQL statements ... exit; ENDSQL close(PLSQL);
My question is how to grab the exit code to execute the sql statement if it encounters some errors. I think using DBI should be much better, but I prefer the solution to the problem above. Thank you very much!
source share