print "Hit to quit\n"; my $quit = ; while(1){ if(-f 'sock_waiting'){ kill 9, $fork_pid; print "User quit\n"; exit; } }