in reply to echo $? in perl
As you were told repeatedly in the CB yesterday, your problem is that you insist on persist in using:
instead of:eval { $mov=$ssh->exec("echo $?\n","2"); }; warn $@ if $@;
In the first, perl is evaluating the $? for you, so the remote machine sees something utterly different. It's seeing 'echo 0\n' instead of 'echo $?\n'. So of course you're always going to get a zero result...eval { $mov=$ssh->exec('echo $?\n',"2"); }; warn $@ if $@;
...roboticus
Update: Upon rereading, the tone was harsher than intended.
|
|---|