in reply to md5 digest of remote file

I am not exactly what the rexec command does but I would think that you will need a | at the end of the open to capture the output of the rexec into your program. Also unless rexec is 8 bit clean and doesn't add any header/trailer information the MD5 sum will not be correct of course. Also, I am assuming the files cannot be made available by some other means (NFS etc).

open(LS, "/bin/ls -l |"); while(<LS>) { print; }

This code will print out the ls command output. I think you are trying to do something similar data flow wise.