learingperl01
MIS
Hello,
I have the following code to generate md5sum for all files found in a directory. I was wondering how to go about sorting on the md5sum column? I tried saving to a variable then splitting on the first column then sorting but did not work. What would be the best way to sort the results that are being generated?
Thanks a lot for the help in advance.
I have the following code to generate md5sum for all files found in a directory. I was wondering how to go about sorting on the md5sum column? I tried saving to a variable then splitting on the first column then sorting but did not work. What would be the best way to sort the results that are being generated?
Thanks a lot for the help in advance.
Code:
open(FILE, $files) or die "Can't open '$_': $!";
binmode(FILE);
print Digest::MD5->new->addfile(*FILE)->hexdigest, " $files\n";
}
}