Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: MD5 hex calculation

by talexb (Canon)
on Apr 24, 2013 at 14:13 UTC ( #1030415=note: print w/ replies, xml ) Need Help??


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

#! 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";
will probably work fine. I just deleted unnecessary lines from your code.

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds


Comment on Re: MD5 hex calculation
Select or Download Code
Re^2: MD5 hex calculation
by BigGer (Novice) on Apr 24, 2013 at 14:15 UTC

    Thank You. I will go and try that and report back. Thanks for your time and help.

    G

      Worked perfectly . Brilliant another piece learned.Thank You

      G

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1030415]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2015-07-04 19:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls