in reply to Re: Net::Telnet problem w/ escape sequences (control stream?)
in thread Net::Telnet problem w/ escape sequences (control stream?)
I dug around and found another HPUX box to test on. This one worked. Adding a print $t->cmd('uname -a'); to my snippet above gets me:
... login garbage ... .^[ i^M ^M.^[[ci^M ^M.^[*s1^^Qi^M ^M$ HP-UX --- B.11.00 U 9000/785 (tc)
I see similar control sequences, but this one ends in the expected prompt, '$'.
So I changed the prompt string to '/(?:TERM = \(hp\)|[:%\$#])\s?$/' and it's working on the first server now.
I need to figure out why under Net::Telnet's connection, the prompt is not being set properly. From /usr/bin/telnet I see '$' on both servers.
--
You said you wanted to be around when I made a mistake; well, this could be it, sweetheart.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Net::Telnet problem w/ escape sequences (control stream?)
by Anonymous Monk on Jun 16, 2004 at 21:57 UTC |