in reply to Re: Setting UTF-8 mode on filehandle reads?
in thread Setting UTF-8 mode on filehandle reads?

 open(FILE, "<", "/path/to/utf8/file.txt") || die "$!";

Why don't use perl 5.8.0 and simply specify IO 'layer' when using three-argument form of open?

open(FILE, '<:utf8', '/path/to/utf8/file.txt') || die $!;

Replies are listed 'Best First'.
Re: Re:^2 Setting UTF-8 mode on filehandle reads?
by grantm (Parson) on Dec 06, 2002 at 18:14 UTC
    Why don't use perl 5.8.0...

    um, because the original poster was looking for a 5.6.1 solution. (And if you actually read my reply you'd see that I suggested exactly what you propose in the first line!)