SIG{INT}=sub{exit}; END { open LOGFILE, ">filename"; print LOGFILE '...everything figured out up to now '; close LOGFILE; } #### ----------------------------------- --the good, the bad and the physi-- -----------------------------------