http://qs321.pair.com?node_id=1127584


in reply to best method in perl to execute command on remote server and fetch its output

Regardless of the programming language you use, and regardless of questions of convenience, you should use ssh. In contrast to both rsh and telnet, it can be secure.

On the perl side of things, Net::OpenSSH has a pretty good reputation. It's ->capture method lets you retrieve the output of a remote command, so it seems to fit your requirements.