At 4:26 am +0900 16/6/05, Robin wrote:

I went back to look at perluniintro because I was sure I could remember reading that the "use utf8" pragma was no longer needed, right under where it says this it continues "Only one case remains where an explicit "use utf8" is needed: if your Perl script itself is encoded in UTF-8...."

Nevertheless (Perl 5.8.6) if you simply comment

#binmode (DATA,":utf8");
#binmode (STDOUT,":utf8");

provided your script is UTF-8 encoded, there is no need for 'use utf8'. The script you posted works fine in that case, as does


$f = "$ENV{HOME}/junk.txt";
open F, ">$f";
print F "月";
close F;
open F, $f;
for (<F>) {/月/ and print}

JD

Reply via email to