in reply to Re^3: sending variables between .pl over remote machines
in thread sending variables between .pl over remote machines

I set this line to a variable like you stated above, however I am not dumping any hash. I thought that printing the $out variable would return the same value as the system command.

my $out = system('ssh $host $cmd'); print $out;

Replies are listed 'Best First'.
Re^5: sending variables between .pl over remote machines
by Utilitarian (Vicar) on Aug 11, 2009 at 14:33 UTC
    examine Bloodnook's advice again ` is not the same as ' and you don't need system when using backticks and while we're at it, have a look at Net::SSH::Perl and see if that would make your life easier.
Re^5: sending variables between .pl over remote machines
by Bloodnok (Vicar) on Aug 11, 2009 at 15:14 UTC
    Further to brother Utilitarians post (& the useful, pertinent stuff therein), the thing you ought to do as a matter of importance is to read system - had you done so, you would now know that the return value from system is not the STDOUT/STDERR from the call, but rather a 16 bit number comprising the return code from the sub-process created and signal number with which the subprocess terminated.

    A user level that continues to overstate my experience :-))