I think regardless of the stdio config settings this was a genuine bug (perlio behaving differently from stdio). But I now have submitted a fix for Perl 5.8.1-to-be, which will hopefully help. I'm marking this problem ticket as resolved.