Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Add:</p> <pre><code> local $/; </code></pre> <p>before reading from the file handle. See <em><a href="https://metacpan.org/pod/perlfaq5#How-can-I-read-in-an-entire-file-all-at-once" rel="noreferrer">How can I read in an entire file all at once?</a></em>, or </p> <pre>$ perldoc -q "entire file"</pre> <p>See <em><a href="https://metacpan.org/pod/perlvar#Variables-related-to-filehandles" rel="noreferrer">Variables related to filehandles</a></em> in <code>perldoc perlvar</code> and <a href="https://metacpan.org/pod/perlfunc#local-EXPR" rel="noreferrer"><code>perldoc -f local</code></a>.</p> <p>Incidentally, if you can put your script on the server, you can have all the modules you want. See <em><a href="https://metacpan.org/pod/perlfaq8#How-do-I-keep-my-own-module-library-directory" rel="noreferrer">How do I keep my own module/library directory?</a></em>.</p> <p>In addition, <a href="https://metacpan.org/pod/Path::Class::File" rel="noreferrer">Path::Class::File</a> allows you to <a href="https://metacpan.org/pod/Path::Class::File#file-slurp" rel="noreferrer">slurp</a> and <a href="https://metacpan.org/pod/Path::Class::File#file-spew-content" rel="noreferrer">spew</a>.</p> <p><a href="https://metacpan.org/pod/Path::Tiny" rel="noreferrer">Path::Tiny</a> gives even more convenience methods such as <a href="https://metacpan.org/pod/Path::Tiny#slurp-slurp_raw-slurp_utf8" rel="noreferrer"><code>slurp</code>, <code>slurp_raw</code>, <code>slurp_utf8</code></a> as well as their <a href="https://metacpan.org/pod/Path::Tiny#spew-spew_raw-spew_utf8" rel="noreferrer"><code>spew</code></a> counterparts.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload