in reply to MD5 hex calculation
You probably need to read the documentation -- although, having just looked at the perldoc for Digest::MD5, it's a little opaque.
You don't need to read anything from the file, or set the binmode .. something like
will probably work fine. I just deleted unnecessary lines from your code.#! c:\\Perl\\bin\\Perl.exe use Digest::MD5 qw(md5_hex); open(FILE, "logs.txt"); # YOU NEED ERROR CHECKING HERE $md5_hex = Digest::MD5->new->addfile(FILE)->hexdigest; close(FILE); print "MD5: " . $md5_hex . "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: MD5 hex calculation
by BigGer (Novice) on Apr 24, 2013 at 14:15 UTC | |
by BigGer (Novice) on Apr 24, 2013 at 14:18 UTC |