I had recently asked for help on telneting from one unix box to another. With your 
help; I'm pleased to say I can now telnet from solaris to an AIX machine. I've also 
learned that the backslash does not work (in this case) to tell perl that the ! is not 
a special character. I had to concatenate the ! into my variable in order for it to 
work.

What I'm trying to do now is to ftp back, in order to send some data.

I show the "print" command in the following lines. I've also tried the "cmd" command, 
and even the "waitfor" command.  This program goes through all the way without any 
errors, however, I know that I'm not logging into the machine (the FTP session) 
because I cannot see any additional processes opened when I do the "who" command.


use lib '/lib/perl/5.00503';
use Net::Telnet;
$t = new Net::Telnet (Timeout=> 15);
$root=root;
$login1="login1"."\!a";
$login2="Login2"."\!hard";
$| = 1;
$\="\n";
$t->open('tzale.com');
$t->login(root, $login1);
$t->cmd ('rm lines.log');
$t->cmd ('ls >> lines.log');
$t->cmd('ftp');
$t->print ("open chavin.com");
$t->waitfor('/ftp> $/i);
$t->print ("root \n");
$t->print ("$login2 \n");
$t->print("cd /data \n");
$t->print("bin \n");
$t->print ("put lines.log \n");
$t->print("bye \n");
$t->print("exit \n");

For this line
$t->print ("open chavin.com");
I've also tried
$t->open ("chavin.com");
$t->cmd ("open chavin.com");

The only line that worked without an error was the print statement and only after I 
enter the  \n

Any ideas?
Thanks



_______________________________________________
Perl-Unix-Users mailing list. To unsubscribe go to 
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users

Reply via email to