
Perl 5.7.x has such a library, and it's my expectation (another sideways glance at Dan) that if we did Parrot, it would include this library. PerlIO attempts to be a very portable stdio (it's running on everything that Perl runs on, AFAIK) and it supports "line disciplines" in the sfio sense: you can stuff processing modules between the file and the filehandle. This allows us to do anything between altering buffering semantics, and decompressing and decrypting files on the fly.
Great!
It'll need to be somewhat rewritten for Perl 6, at which point I'm hoping it'll be done in such a way that it'll make it easier to extract from the Perl mess around it and be made available to other projects.
I hope that even if the Parrot goal is to support all languages, PerlIO can be made a separate and independent project, not relying on Perl internals. (And I'd change the name, but maybe that's asking too much. :-) --Guido van Rossum (home page: http://www.python.org/~guido/)