in reply to When is a logical or not logical
How do you know that the logfile gets opened, and what does $! hold at the point the script dies? It seems to me that you're inadvertantly withholding some clues.