Always return undef from READLINE for EOF or failure

Otherwise the common idiom `while (<$in>)` doesn't work as expected.