require POSIX; $SIG{INT} = sub{ warn 'Interupted'; POSIX::close( $_ ) for 0 .. 255; exit; };