| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Help with my perl, how to send email when sees error
Hi, Folks
I have a perl scripts like this:
my @param = @_;
$message = $param[0];
$CommandString = "/bin/mailx -s \"$message\" xxxx\@yyyy.com ";
system ( $CommandString );
}
use strict;
use DBI;
my $dbh = DBI->connect ( 'dbi:Oracle:test',
'system',
'manager',
{
PrintError => 0,
RaiseError => 1,
AutoCommit => 1
}
) || die "Database Connection not made
$DBI::errstr" ;
while (my @rows = $sth->fetchrow_array) {
print "@rows[0]\n";
}
$sth->finish();
if ($dbh->error) {trap_die("error");}
but it will not work because the perl will exit as soon as it raise
error.
Thanks for your help.
-- Sent by dbadba62 from hotmail in area com This is a spam protected message. Please answer with reference header. Posted via http://www.usenet-replayer.com/cgi/content/newReceived on Tue Sep 25 2001 - 14:37:44 CDT
![]() |
![]() |