Try setting the Input_Log=> $file and Output_Log=>$file args up in your new and examine the output from that session. I would check to see what type of terminal Net::Telnet thinks it is talking to also. It looks like you are Linux or Unix box, but the following info may help troubleshoot...

On Windows 2000/XP, Net::Telnet has a problem finding the command prompt and the output because the Microsoft Telnet Server dumps ANSI escape codes into the output. As a result (on Win32 anyway) you have to parse out the weird ANSI codes. (My point... if the Telnet Servers are not the same, you may not get the same results... why? Net::Telnet doesn't negotiate all of the Telnet Opts as best I can tell... If a Server doesn't successfully negotiate a Command Code, it is supposed to drop back to a RFC854 compliant mode... but it doesn't always... uggh... I could go on...) So... look in the log files.. if you see stuff like ~12;1H~Kc:\> in your output then the telnet server is sending ANSI escape codes...

With that being said, I got frustrated with the ANSI codes interfering with the output so 2 weeks ago I found all of the ANSI escape codes for VT52 and VT100 Terminal Emulations and built a module to escape them all from the Net::Telnet buffer using RegExs.

I was still having problems with Net::Telnet's approach of waiting for a specific pattern match, so I decided to build a Telnet client as an exercise that just spits out the text clear of ANSI codes from whatever command you send to the Telnet client.

BOTTOM LINE POSSIBLE SOLUTION: If you or someone else needs to escape VT52/VT100 codes. Post a reply and I will put the Module in your node.... or if you want a Simple Telnet Client codes lemme know and I will e-mail it to you or post it here if folks think it's ok.. it is about 150 lines... hope this wasn't too verbose...

Cheers,
James :)

In reply to Re: Net::Telnet stalls by JamesNC
in thread Net::Telnet stalls by JoeJaz

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.