I wouldn't recommend anything starting with "File::Slurp" That's an incredibly ignorant thing to say. File::Slurp is over 20 years old and is a dependency in more than 500 CPAN distributions. Do a little research on Uri Guttman. Leon Timmermans, one of the prominent Perl contributors of the new generation, author of File::Slurp::Tiny, is not exactly known for unreliable code, either. To the OP: some of what you will receive here in response to your questions is utter crap. Do your own due diligence and evaluate the advice you get in other parts of the Perl realm ...
Hmm, I don't think its ignorant. You recommended one thing, I did another.
That File::Slurp is old, that the authors are prolific and respected , that is all great, but doesn't negate my experience
I prefer Path::Tiny because of the api, its very memorable, the File::Slurp... api not so much
I much prefer slurp_raw to read_file( 'filename', { binmode => ':raw' } ) ;
Its rare to only want to slurp, and Path::Tiny also does all the things that go along with , all that File::Spec/File::Copy/File::Path stuff
In reply to Re^4: How do I modify a line within the file itself?
by Anonymous Monk
in thread How do I modify a line within the file itself?
by newbie4659
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |