Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 84986 invoked from network); 28 Jun 2009 16:13:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Jun 2009 16:13:20 -0000 Received: (qmail 83049 invoked by uid 500); 28 Jun 2009 16:13:28 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 83009 invoked by uid 500); 28 Jun 2009 16:13:28 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 83001 invoked by uid 99); 28 Jun 2009 16:13:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 Jun 2009 16:13:28 +0000 X-ASF-Spam-Status: No, hits=4.1 required=10.0 tests=HELO_LH_HOME,SPF_PASS,URIBL_RHS_DOB X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [165.154.121.7] (HELO gateway.clarkconnect.lan) (165.154.121.7) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 Jun 2009 16:13:17 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by gateway.clarkconnect.lan (Postfix) with ESMTP id 204CF109A165 for ; Sun, 28 Jun 2009 12:12:51 -0400 (EDT) X-Virus-Scanned: amavisd-new at clarkconnect.lan Received: from gateway.clarkconnect.lan ([127.0.0.1]) by localhost (gateway.clarkconnect.lan [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OHxahiRXScn1 for ; Sun, 28 Jun 2009 12:12:36 -0400 (EDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by gateway.clarkconnect.lan (Postfix) with ESMTP id B707F109A1C6 for ; Sun, 28 Jun 2009 12:12:36 -0400 (EDT) Received: from fred (unknown [192.168.1.197]) by gateway.clarkconnect.lan (Postfix) with ESMTP id 99325109A165 for ; Sun, 28 Jun 2009 12:12:36 -0400 (EDT) Message-ID: From: "Mike OK" To: "mod_perl list" References: <4A478F38.6070805@ice-sa.com> In-Reply-To: <4A478F38.6070805@ice-sa.com> Subject: Re: quick pure perl question Date: Sun, 28 Jun 2009 12:12:22 -0400 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=response Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Windows Mail 6.0.6001.18000 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049 X-Virus-Checked: Checked by ClamAV on apache.org Check out this man page http://perldoc.perl.org/functions/open.html For encoding UTF8, the example is open(FH, "<:encoding(UTF-8)", "file") Mike ----- Original Message ----- From: "André Warnier" To: "mod_perl list" Sent: Sunday, June 28, 2009 11:41 AM Subject: quick pure perl question > Hi. > By curiosity, and just in case anyone knows off-hand : > > perl 5.8.8 > > In a script, I substantially do this : > > open(FIRST,'<:utf8',$name1); > open(SECOND,'>:raw',$name2); > while(defined($line = )) { > print SECOND $line; > } > > and I get warnings : "wide character in print to ,.." > > I mean, I know that my data is UTF-8, and I know that some characters are > going to be "wide", and that's how I want them. > I also know that I could specify the output I/O layer as 'utf8' (which > avoids the warning). > But why do I get warnings when I specified 'raw' as the I/O layer ? > Doesn't 'raw' mean like 'as is' ? > > > >