Shlomi Fish committed 77cba53

Made all opens in the examples three-args opens.

Comments (0)

Files changed (1)

 	      declaration. Here is an example to follow:
 	      <programlisting>use XML::LibXML;
 # load
-open my $fh, "file.xml";
+open my $fh, '&lt;', 'file.xml';
 binmode $fh; # drop all PerlIO layers possibly created by a <literal>use open</literal> pragma
 $doc = XML::LibXML-&gt;load_xml(IO => $fh);
 # save
-open my $out, "out.xml";
+open my $out, '&gt;', 'out.xml';
 binmode $out; # as above
 # or
-print $out $doc-&gt;toString();</programlisting>
+print {$out} $doc-&gt;toString();</programlisting>
                       document (see the actualEncoding() method)! This means you
 		      can simply do:
-		    <programlisting>open OUT, $file;
-print OUT $doc-&gt;toString;</programlisting>
+            <programlisting>open my $out_fh, '&gt;', $file;
+print {$out_fh} $doc-&gt;toString;</programlisting>
                    <para>regardless of the actual encoding of the document.
 		   See the section on encodings in <xref linkend="XML-LibXML"/> for more details.</para>
                     <para>The optional <emphasis>$format</emphasis> parameter sets the indenting of the output. This parameter is expected to be an
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.