in reply to rlogin followup

Given your question, I'm going to recommend you look into setting up Big Brother or Spong.

If you really want to write the thing yourself, though, you need to read up on Perl a lot more. Just because you execute an rlogin command in with system(), that's not going to make your Perl script start running commands on that system when you use backticks. You could use $var1 = `rsh remotemachine df -k`

You should probably at least look through spong if you want some ideas of how to implement this on your own, though.