in reply to output of a system call

Take a look at Net::SSH (best), Net::Rsh, or one of the telnet modules.

After Compline,
Zaxo