in reply to return value of net:telnet is wrong @exit_status = $telnet->cmd("echo $?")

The Net::Telnet doc suggests that the return value from cmd is a server response, not an exit status as you seem to think.
  • Comment on Re: return value of net:telnet is wrong @exit_status = $telnet->cmd("echo $?")
  • Download Code

Replies are listed 'Best First'.
Re^2: return value of net:telnet is wrong @exit_status = $telnet->cmd("echo $?")
by need_help21 (Novice) on Nov 29, 2007 at 14:12 UTC
    hi moritz, thanks for looking into this problem! what should the server response be over here? And if this way i cannot get the result waht is required there.. what could be the possible way to get the exit status of the "sh $sDriver" which i executed on the remote machine. Please help !! any help appreciated!
      I want to thanks BART for his suggestion in CB that the $ sign in "echo $?" should be escaped. This was actually the probelm. Now it has got solved. Thank BART and thanks to all.