NodeReaper has asked for the wisdom of the Perl Monks concerning the following question:

  • Comment on executing commands and getting output from program

Replies are listed 'Best First'.
Re: executing commands and getting output from program
by Abigail-II (Bishop) on Sep 05, 2003 at 07:46 UTC
Re: executing commands and getting output from program
by nite_man (Deacon) on Sep 05, 2003 at 07:38 UTC

    Try to look at module Net::SSH::Perl:

    my $ssh = new Net::SSH::Perl('host_name'); $ssh->login('user_name', 'user_pass'); my ($stdout, $stderr, $exit_code) = $ssh->cmd('ls -l');

    _ _ _ _ _ _
      M i c h a e l