in reply to Re: Net::Telnet problem w/ escape sequences (control stream?)
in thread Net::Telnet problem w/ escape sequences (control stream?)

Cool suggestion! I looked in the .profile (and .login) and saw the tset and stty commands as expected.

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.

--Solo
--
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

    those are escape characters (bold,colors,etc) and the holdup is tset asking you to confirm the terminal type (hp)

    # probably looks like tset ?hp # remove question mark to accept hp always tset hp # choose dumber terminal type to possibly rid self of those # nasty escape sequences tset dumb tset ansi