in reply to md5 digest of remote file

By the looks of it, you are almost there. Apart from the two identical lexical variables problem hardburn mentioned, all you need is getting the remote file:
my $remote_file="remote_file"; my $openstring="/usr/bin/rexec $host -l $user cat $remote_file |"; # note the cat command, and the pipe at the end open FILE, $remote_file or die "Blerch: $!\n"; $md5=Digest::MD5->new(); while (<FILE>) { $md5->add($_); } close FILE; print $md5->b64digest; warn "Code is untested.";
Of course this presumes your .rhosts or hosts.equiv files are set up correctly.

Update: Fixed typo in code (replaced [ by { )

CU
Robartes-

Replies are listed 'Best First'.
Re: Re: md5
by traveler (Parson) on Mar 21, 2003 at 19:13 UTC
    Maybe if you(qball) can run cat on the other computer, you can also run md5sum or a perl script that does the summing there as Jenda suggested. If you cannot install a script there, but that site has perl and Digest::MD5, you can do something along the lines of open FILE, "/usr/bin/rexec $host -l $user perl -e 'use Digest::MD5 ... and include the code in the command line you put into the open open.

    HTH, --traveler

Re: Re: md5
by qball (Beadle) on Mar 21, 2003 at 19:24 UTC
    robartes, your code works well. Many thanks.

    qball~"I have node idea?!"