Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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

Replies are listed 'Best First'.
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?
[hippo]: I had a low-paid job about 20 years ago and seriously considered going down to a 3-day week. Would have worked 60% of the time for about 80% of the cash.
[Corion]: ambrus: Well, I pay rent, but don't own a house with variable/ unforeseeable costs
[hippo]: The thesholds/benefits balance at the time was nuts.
[hippo]: But that doesn't last because, you know ... politicians. :(
[Corion]: hippo: Yeah, if you still get enough money to get by and don't have expensive hobbies or other fixed costs that can work out well
[ambrus]: ah good. I pay only rent too. but that still costs significant money.
[Corion]: ambrus: Yes, but that is already budgeted for

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2017-09-21 15:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (249 votes). Check out past polls.

    Notices?