develooper Front page | perl.perl5.porters | Postings from February 2003

[PATCH] perluniintro nit

Thread Next
From:
Autrijus Tang
Date:
February 6, 2003 08:02
Subject:
[PATCH] perluniintro nit
Message ID:
20030206160249.GA12984@not.autrijus.org
Self-explanatory patch. :-)

Before this patch the example does not work as advertised because
the %ENV isn't set until after the compile-time 'use open'.

Thanks,
/Autrijus/

--- perluniintro.pod.orig	Thu Feb  6 12:45:57 2003
+++ perluniintro.pod	Thu Feb  6 12:46:10 2003
@@ -363,7 +363,7 @@
 
 With the C<open> pragma you can use the C<:locale> layer
 
-    $ENV{LC_ALL} = $ENV{LANG} = 'ru_RU.KOI8-R';
+    BEGIN { $ENV{LC_ALL} = $ENV{LANG} = 'ru_RU.KOI8-R'; }
     # the :locale will probe the locale environment variables like LC_ALL
     use open OUT => ':locale'; # russki parusski
     open(O, ">koi8");

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About