Perl SHA256SUM Clarification
I am writing a perl script to take the SHA256SUM of every image file in a directory. The problem is that the SHA256SUM created by perl is different than the one created by the straight sha256sum utility from the command line.
The perl script returns hashes much quicker than the command line, leading me to believe the image files are not actually being used, but some other value (like their names for instance).
I am using "strict" and "warnings", and no errors are being returned.
if you want to slurp a whole file as one string:
or better use Digest::File (I ain't tried it)
also, you can shortcut and use a glob pattern rather than readdir
@list = <*.img *.jpg>
it's easier to use find2perl to traverse directories.
perl programming is about laziness!
It ended up being a simple fix.
All that had to be done was open the file and switch to a binary reading mode.
|All times are GMT -5. The time now is 01:13 PM.|