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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.