in reply to capture error executing a binary

If the C binary is giving you trouble, and all it's doing is pulling stuff out of a database, then you might consider factoring the binary out, and replacing it with DBI (unless there are problems with getting DBI and the appropriate DBD modules installed, in which case, you might want to see what's needed to solve those problems...)

Apart from that, you don't show any code, so we don't know why the perl script aborts. Maybe it's because the script is written like this:

my $failure = system( "c_binary ..." ); # system returns exit status die $! if ( $failure ); # which is normally non-zero on failure
If that's the case, all you need to do is replace "die" with "warn", and redirect the STDERR from your script into a log file -- e.g. if you are using a bash or similar type of shell:
your_perl_script ... 2>> log.file

Replies are listed 'Best First'.
Re^2: capture error executing a binary
by tariqahsan (Beadle) on Jun 09, 2005 at 18:30 UTC
    It's an API that comes with the application to get certain data from it's database.
    The database is black box and the API could'nt be replace with using DBI from the perl script.

    Thanks for the suggestions. I'll try it out.