CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner:
Telnet with perl



May 8, 2001, 11:01 AM

Post #1 of 2 (1312 views)
Telnet with perl Can't Post

I'm using the following commands on Solaris 2.7

$command="ftp"; (or telnet)
&ExecuteAndPrint ($command);

This works, except the machine is waiting for a return key. I've used \n and \r (example $command="ftp\n")

The first command is sent, then the system waits. I would like to telnet and ftp to other machines to grab information from one file and enter it into another file on my machine. Then run a perl program to process the information. The information I'm trying to get at this time is just the ouput on a unix ls command.



May 8, 2001, 12:21 PM

Post #2 of 2 (1311 views)
Re: Telnet with perl [In reply to] Can't Post

Sometimes on certain network programs, the actual newline sequence is a "\r\n" combo - try that, or also try "\015\012", "\012\015" or "\012\012\015" - I can't remember which one works in your situation.

Hope this helps!

r j o s e p h
"Violence is a last resort of the incompetent" - Foundation


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives