in reply to When is a logical or not logical

When called via "at" or the simple scheduler I wrote, it opens the logfile AND dies.

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.