File::Slurp::Sane - A simple, sane and efficient file slurper
version 0.001
use File::Slurp::Sane 'read_text'; my $content = read_text($filename);
DISCLAIMER: this module is experimental, and may still change in non-compatible ways.
This module provides functions for fast and correct slurping and spewing. All functions are optionally exported.
Reads file $filename into a scalar and decodes it from $encoding (which defaults to UTF-8). Can optionally take this named argument:
$filename
$encoding
crlf
This forces crlf translation on the input. The default for this argument is platform specific.
Reads file $filename into a scalar without any decoding or transformation.
Reads file $filename into a list/array after decoding from $encoding. By default it returns this list. Can optionally take this named argument:
chomp
chomp the lines.
Open dirname and return all entries except . and ... Can optionally take this named argument:
dirname
.
..
prefix
This will prepend $dir to the entries
$dir
Path::Tiny
A minimalistic abstraction not only around IO but also paths.
File::Slurp
Another file slurping tool.
Leon Timmermans <leont@cpan.org>
This software is copyright (c) 2014 by Leon Timmermans.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install File::Slurp::Sane, copy and paste the appropriate command in to your terminal.
cpanm
cpanm File::Slurp::Sane
CPAN shell
perl -MCPAN -e shell install File::Slurp::Sane
For more information on module installation, please visit the detailed CPAN module installation guide.