From: Jarkko Hietaniemi Date: Sun, 20 Oct 2002 15:48:09 +0000 (+0300) Subject: perluniintro X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c722ef0a9de73f0b0b48ec98b598b2cc10421bc5;p=p5sagit%2Fp5-mst-13.2.git perluniintro Message-ID: <20021020124809.GE444369@lyta.hut.fi> p4raw-id: //depot/perl@18049 --- diff --git a/pod/perluniintro.pod b/pod/perluniintro.pod index 223dbae..c2a57d8 100644 --- a/pod/perluniintro.pod +++ b/pod/perluniintro.pod @@ -398,9 +398,10 @@ written to the stream. For example, the following snippet copies the contents of the file "text.jis" (encoded as ISO-2022-JP, aka JIS) to the file "text.utf8", encoded as UTF-8: - open(my $nihongo, '<:encoding(iso2022-jp)', 'text.jis'); - open(my $unicode, '>:utf8', 'text.utf8'); - while (<$nihongo>) { print $unicode } + open(my $nihongo, '<:encoding(iso-2022-jp)', 'text.jis'); + open(my $unicode, '>:utf8', 'text.utf8'); + select $unicode; + while (<$nihongo>) { print } The naming of encodings, both by the C and by the C pragma, is similar to the C pragma in that it allows for