summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pod/perluniintro.pod4
1 files changed, 2 insertions, 2 deletions
diff --git a/pod/perluniintro.pod b/pod/perluniintro.pod
index ee61acfb02..86360d4a72 100644
--- a/pod/perluniintro.pod
+++ b/pod/perluniintro.pod
@@ -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