I am trying to read the contents of a file so that I can transfer it to the database (I don’t need to parse the data and it doesn’t matter what it says).
Files can be any arbitrary types of arbitration (.exe, .txt, without extension, etc.), but from what I can tell, there is a non-binary way to read the file and a specific binary path (using binmode), and it seems like if you use them incorrectly for the wrong type, this can lead to distortion of your files (at least on windows?)
Is there a slippery way of reading in the contents of a file without worrying about what kind of data it has?
source
share