0 Replies - 1536 Views - Last Post: 16 October 2007 - 04:27 AM

#1 no2pencil   User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6822
  • View blog
  • Posts: 31,459
  • Joined: 10-May 07

MD5 : with files

Posted 16 October 2007 - 04:27 AM

Description: Add this snippet to your perl script, & you can feed files via command line. It will give the md5 results on each file passed in.
#
# Use of md5 : with files
#
# -#2pencil- Written for  - 10/15/2007
#
################

use Digest::MD5 qw(md5 md5_hex md5_base64);
use IO::File;

my $chk = Digest::MD5->new();

foreach my $file (@ARGV) {
    $chk->addfile(IO::File->new($file));
    print "$file : ",$chk->hexdigest,"n";
}




Is This A Good Question/Topic? 0
  • +

Page 1 of 1