$SIG{INT} = \&UserInterrupt; sub UserInterrupt{close(INPUT_HANDLE);}