This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: [perl #58218] backwards logic in perluniintro (5.10.0)
authorDr.Ruud <rvtol+news@isolution.nl>
Sat, 23 Aug 2008 10:07:45 +0000 (12:07 +0200)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Sun, 24 Aug 2008 14:39:10 +0000 (14:39 +0000)
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Message-ID: <20080823081032.32162.qmail@lists.develooper.com>

p4raw-id: //depot/perl@34223

pod/perluniintro.pod

index ee61acf..86360d4 100644 (file)
@@ -653,8 +653,8 @@ Use the C<Encode> package to try converting it.
 For example,
 
     use Encode 'decode_utf8';
-    eval { decode_utf8($string, Encode::FB_CROAK) };
-    if ($@) {
+    
+    if (eval { decode_utf8($string, Encode::FB_CROAK); 1 }) {
         # $string is valid utf8
     } else {
         # $string is not valid utf8