GetControlChars() should return something that looks like a control char this patch made it return a number instead. Found while porting sslmate. perl -MTerm::ReadKey -MScalar::Util -e \ 'print Scalar::Util::looks_like_number({GetControlChars}->{EOF}) ? 1 : 0;' The above should return 0 but as returning 1.