Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Telnet via Perl fails

by jepri (Parson)
on May 22, 2004 at 06:46 UTC ( [id://355557]=note: print w/replies, xml ) Need Help??


in reply to Telnet via Perl fails

The program will halt until telnet finishes on line six, and returns a value.

If telnet succeeds, it won't return. If telnet fails, you've lost anyway.

perlipc goes into this in detail, prepare yourself for a big, complicated read.

But what will work better for what you want is to open a socket directly to the telnet port, and read using select() calls , and sysread ans syswrite, IIRC.

Networking is complicated, so this will take a while to figure out. Keep at it though, it's the most fun bit of computing (for me).

____________________
Jeremy
I didn't believe in evil until I dated it.

Replies are listed 'Best First'.
Re: Re: Telnet via Perl fails
by shamala (Acolyte) on May 22, 2004 at 07:25 UTC

    got some help on this...sharing it with you.

    my friend says we should try duping the descriptors so

    that the forked process containing the telnet command

    can be controlled by us...pass the rest of the commands

    starting from line7 to the duped descriptor which takes input from STDIN

    but me doesnt know how to work with descriptors

    will do some R&D on it today

    u could try it out too..;)

    and ofcourse let me know abt it

    thanks a lot

    shamala

      No, I won't do your work for you.

      And if you keep listening to your friend rather than reading the manual (perlipc), you'll waste a lot of time. But that's your problem, not mine.

      ____________________
      Jeremy
      I didn't believe in evil until I dated it.

        oh no..i definitely dont want you to do my work...and abt the problem its only if you did my work for me... thanks anyways.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://355557]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2024-04-26 03:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found