From the Net::Telnet doc:
The output record separator for print() and cmd() is set to "\n" by de +fault, so that you don't have to append all your commands with a newl +ine. To avoid printing a trailing "\n" use put() or set the output_re +cord_separator to "".
Which means whenever you use 'print' or 'cmd' it will send a newline, whether you wanted one or not.
Further:
In the input stream, each sequence of carriage return and line feed (i +.e. "\015\012" or CR LF) is converted to "\n". In the output stream, +each occurrence of "\n" is converted to a sequence of CR LF. See binm +ode() to change the behavior. TCP protocols typically use the ASCII s +equence, carriage return and line feed to designate a newline.
Eg: All newlines are sent as "\r\n", as that is how Telnet does newlines.

Maybe you should show some code where you tried changing the output_record_separator, or try using put() ?

C.


In reply to Re: Net::Telnet problems with Net::Telnet in handling inputs by castaway
in thread Net::Telnet problems with Net::Telnet in handling inputs by ravi_sha

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.