Within a perl script I have a C binary which gets executed.
The binary basically does a database connection and fetches data from a database table.
There could be a bug in this binary where sometimes it gives a segmentation fault and does a core dump. In this kind of situation the wrapper perl script aborts execution
What would be a good way to capture this error in a log file through error handling?