On 10/05/2013 04:54 AM, Rob Dixon wrote:
Uri, I rarely see File::Slurp recommended other than by yourself.
usually it is in the context of a work-around for Perl's lack of support
for a regex version of $/. I have also never had occasion to use it
myself, despite a working understanding of its facilities. I accept that
you believe your advice to be equitable, but it is inevitable that a
rosy glow will surround anything that is the product of your own labours.
it just happens to be one of the more popular modules on cpan. take a look:
https://metacpan.org/requires/distribution/File-Slurp
i recommend and so do many other people in other areas. it solves a real
problem in a simple and efficient way. it is way more than allowing $/
to be a regex. it eliminates needing to know about $/ at all and the
quirks it has. the module also offers ways to edit a file and also write
one out. there are many time when you want to just write or read a whole
file. the fact that you haven't found a use for this is not a negative
on the module. and newbies have a strong need for it as they tend to do
silly thing like reading a file into an array and then joining the lines.
i don't recommend it as self promotion or anything but using it for good
reasons.
uri
--
Uri Guttman - The Perl Hunter
The Best Perl Jobs, The Best Perl Hackers
http://PerlHunter.com
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/