http://www.perlmonks.org?node_id=1004481


in reply to Program unexpectedly terminates

The code you have shown has a problem. You are assigning an array (1..100) as the value in a hash. You need an array reference for that (use brackets instead of parentheses). However, I doubt that is the real problem with your code--it was probably just a mistake when you created the simplified example.

Also, I tried your CORE::GLOBAL::exit override, and it didn't do anything--it only got worked if I explicitly called the exit() command, which your code does not.

I think your problem must be in the processing that you are not showing. It could be failing on the same one each time. Because you are processing in a random order, it would take varying amounts of time for that condition to be reached.

I suggest some good, old-fashioned debug print statements within your processing loop. Log the id of each record you are looking at, and record the success of each significant operation. That should help you to know where it fails.



When's the last time you used duct tape on a duct? --Larry Wall