in reply to sqlplus or DBI

system() is not the right function for the purpose of capturing output. Consider qx// (aka `backticks`) or open() for that job.

I don't know if grepping for "ERROR" in the command's STDOUT would suffice, you should be able to specify that ;)

open my $pipe , '-|' , 'sqlplus user/pass @test.sql' or die "hmm? $!"; while( <$pipe> ){ print if /error/i } close $pipe or die "hmhmm? $!";
--
http://fruiture.de