http://www.perlmonks.org?node_id=1023657


in reply to Re^4: Urgent Help For Perl Issues
in thread Urgent Help For Perl Issues

As suggested by marto just print

print "$stdout\n"; print "$stderr\n"; print "$exit\n";

after

my($stdout, $stderr, $exit) = $ssh->cmd("cd testing");

Replies are listed 'Best First'.
Re^6: Urgent Help For Perl Issues
by salva (Canon) on Mar 15, 2013 at 10:27 UTC
    ssh opens a new session for every command run and so commands with side effects as cd doesn't work as expected.

    Use shell conjunctions instead to run the two commands as one:

    $ssh->cmd("cd $dir && $cmd")
      No Luck salva..Any Other ideas..
        yes, post your code, otherwise nobody is going to guess what you are doing wrong!
        A reply falls below the community's threshold of quality. You may see it by logging in.
Re^6: Urgent Help For Perl Issues
by arvindninestars (Initiate) on Mar 18, 2013 at 07:20 UTC
    Showing Empty Values Only Marto..No Luck