Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^5: Urgent Help For Perl Issues

by vinoth.ree (Prior)
on Mar 15, 2013 at 10:17 UTC ( #1023657=note: print w/ replies, xml ) Need Help??


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");


Comment on Re^5: Urgent Help For Perl Issues
Select or Download Code
Re^6: Urgent Help For Perl Issues
by salva (Abbot) 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!
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1023657]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2015-07-04 02:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls