My goal is to get the md5 digest for a remote file. What is the best approach for doing so? Should I start with using Digest::MD5?
use Digest::MD5;
my $host = "host";
my $remote_file = "remote_file";
my $remote_file = "/usr/bin/rexec $host -l $user $remote_file";
open(FILE, $remote_file) or die "Can't open '$remote_file': $!";
binmode(FILE);
$md5 = Digest::MD5->new;
while (<FILE>) {
$md5->add($_);
}
close(FILE);
print $md5->b64digest, " $remote_file\n";
The above doesn't work for me on linux. Any suggestions?
qball~"I have node idea?!"