ambrus has asked for the wisdom of the Perl Monks concerning the following question:
I tried to convert this code line:
to an object-oriented variant using IO::Handle, but this:binmode STDIN, ":utf8";
does not work, it dies with Can't locate object method "binmode" via package "IO::Handle". (I am using perl, v5.8.2 built for i686-linux here).use IO; STDIN->binmode(":utf8");
I've grepped the IO, IO::Handle, IO::Seekable, IO::File manpages, and they don't say anything about binmode either.
It seems that the IO::File::open function accepts io layers, but what do I do with an already open file.
See Getting IO::File, PerlIO Layers and POSIX to play together for the original question that made me think about this.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Object-oriented interface for binmode
by simonm (Vicar) on Jul 08, 2004 at 22:54 UTC | |
by gellyfish (Monsignor) on Jul 09, 2004 at 09:03 UTC | |
by BrowserUk (Patriarch) on Jul 09, 2004 at 09:13 UTC | |
|
Re: Object-oriented interface for binmode
by BrowserUk (Patriarch) on Jul 08, 2004 at 19:14 UTC | |
by simonm (Vicar) on Jul 08, 2004 at 23:03 UTC | |
by BrowserUk (Patriarch) on Jul 08, 2004 at 23:30 UTC | |
|
Re: Object-oriented interface for binmode
by ambrus (Abbot) on Jul 07, 2006 at 14:13 UTC |