This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
(perl #127780) point backtick users at the open pragma
[perl5.git] / pod / perlop.pod
index 9b1319a..6bca9f7 100644 (file)
@@ -2316,6 +2316,12 @@ failure modes by inspecting C<$?> like this:
         printf "child exited with value %d\n", $? >> 8;
     }
 
+Use the L<open> pragma to control the I/O layers used when reading the
+output of the command, for example:
+
+  use open IN => ":encoding(UTF-8)";
+  my $x = `cmd-producing-utf-8`;
+
 See L</"I/O Operators"> for more discussion.
 
 =item C<qw/I<STRING>/>