in reply to Logging and and capturing sqlplus parameters and results in log

There is no PERL. The name of the language is Perl, the name of the interpreter is perl. And perl is typically NOT a shell.

In Perl, you don't want to mess with sqlplus. You use DBI and DBD::Oracle. Errors can be handled "as usual" (i.e. eval {} and $@) if you use set the RaiseError attribute of the database handle, typically by including it in the attr hash of the DBI connect method.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)