Hey guys, A few questions from a beginner. :)
What does the \r in system("\r\n\r"); do? Where can I find some info on the system function/method? Is it function or method? What is the proper terminology? And regarding all system ("command")'s below is the parenthesis required around the quotations or is it just for aesthetics? Does anyone have something like this for Windows Telnet connecting to Exchange? Thanks AD.... -----Original Message----- From: Adam Saeed [mailto:[EMAIL PROTECTED] Sent: Thursday, October 21, 2004 10:32 PM To: [EMAIL PROTECTED] Subject: script how to interactive mode in telnet i want to write a script that automatically call telnet and do some stuff and exit. e.g telnet open <ip addres> <port> e.g port = 25 then.. it sends helo test mail from> bla bala bla rset quit ... when i done doing it through system command , it comes to interactive mode and give prompt. telnet> then i have to type all by hand. instead i want it to write through my script.. ' any idea. thanks adam code attached: #! /usr/bin/perl -w print "Enter ip address where smtp server is running\n"; chomp ($ip=<STDIN>); system ("telnet"); system ("open $ip 25"); system("helo test"); system("mail from: [EMAIL PROTECTED]"); system("mail to: [EMAIL PROTECTED]"); system("data"); system("this is a news\n"); system("\."); system("\r\n\r"); system("rset"); system("quit"); exit 1; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>