File::Slurp is broken, especially with regard to character encoding and I/O layers. It should be eschewed. File::Slurper is a modern replacement, or use Path::Tiny.
The way forward always starts with a minimal test.
| [reply] |
| [reply] |
Here's a recent blog post from Leon Timmermans (author of File::Slurper) titled "File::Slurp is broken and wrong".
Personally, I have not had any issues using File::Slurp. But then again, I haven't used it in the problematic scenarios as described in the blog post and mentioned in the discussion link provided by 1nickt. Despite not encountering any issues so far, I'm thinking that I might want to revisit some of my older code to change them to not use File::Slurp to help avoid potential problems.
| [reply] |