Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I guess what you're intending is this: first establish the connection and then you'd like telnet to hand over control to you in interactive mode.

The problem with your approach is that while you might be able to establish the session, you won't be able to jump into the open session interactively. At the end of your script, the session just gets dropped.

If you can't find the file controlling telnet's default settings, I'd probably use Expect for this task . Expect lets you call telnet, waits for its prompt, then lets you send the set localecho command, wait for the prompt again and finally take over the session via Expect's interactive command.

There's a Perl module (Expect) for it, but I'm not sure if it works on Windows. You might want to use the original, Tcl-(gack!)-based Expect version.

In reply to Re: Attempting to open and pass info to MS Telnet by saintmike
in thread Attempting to open and pass info to MS Telnet by giricredwolf

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

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2022-01-26 19:58 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (70 votes). Check out past polls.