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>