From: Dr.Ruud Date: Sat, 23 Aug 2008 10:07:45 +0000 (+0200) Subject: Re: [perl #58218] backwards logic in perluniintro (5.10.0) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=228ee848f02d1db8db39c97ee13c0c9975afa083;p=p5sagit%2Fp5-mst-13.2.git Re: [perl #58218] backwards logic in perluniintro (5.10.0) From: "Dr.Ruud" Message-ID: <20080823081032.32162.qmail@lists.develooper.com> p4raw-id: //depot/perl@34223 --- diff --git a/pod/perluniintro.pod b/pod/perluniintro.pod index ee61acf..86360d4 100644 --- a/pod/perluniintro.pod +++ b/pod/perluniintro.pod @@ -653,8 +653,8 @@ Use the C 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