Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- setting binmode for empty filehandle
- Helmut Richter
April 8, 2014, 8:28 pm
rate this thread
worry if I set
use utf8; # because the source is also UTF-8
binmode (STDIN, ':utf8');
binmode (STDOUT, ':utf8');
binmode (STDERR, ':utf8');
This would work for explicit usage of these filehandles and for implicit usage
of STDOUT via "print" without a filehandle. It has, however, no effect on <>.
Well between <> there is nothing, why not try
binmode ('', ':utf8');
but that does not help either.
There is an obvious work-around: find myself the command line parameter with
the file name and open it explicitly, or else use STDIN. Possible, but clumsy.
Perhaps, the recommended way of dealing with *all files are Unicode* is
something else. I am open to learn.
- » Perl to SQLite bridge is not working, database connect fails ....
- — Previous thread in » PERL Discussions