Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
First, please forgive a lack of technical terms. I'm very new to some of this.

I'm trying to write a perl program on WindowsXP that opens Telnet (telnet.exe) in a write-to mode. It then passes the phrase "set localecho" and an "enter" to set localecho on. Then it passes "open" to open my favorite MUD. THen I want the program to exit while Telnet continues to run in another command prompt window.

Here's what I have so far:
use strict; #use strict... open(TELNET, "|telnet") or die "$!"; #open writable telnet or di +e sleep 5; #wait 5 seconds print TELNET "set localecho\n"; #Turn telnet "localecho" on sleep 5; #wait 5 seconds print TELNET "open\n"; #Open DiscworldMUD
All I can find this does so far is that it opens Telnet. I'm not sure what I'm doing wrong or if I should use Win32::Process stuff. What I really want to do is change the default settings for TelNet, but I can't find a file that it pulls settings from. I'm just trying to find a way to get around typing in "set localecho" every time I run the thing.

Any help?

In reply to 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 rifling through the Monastery: (4)
As of 2022-05-16 19:46 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (63 votes). Check out past polls.