in reply to delete 'self' after running
.... do something .... if (my $pid = fork()){ exit; } else { sleep 20; unlink file; exit; } [download]