> Hi, > Thanks for your reply. Actually i need to login to a remote machine > and do some series of steps including creating,editing and taring some > files and executing some other scripts..The remote machine is in our > local network itself..so there is no security issues and thats why i > am using telnet. Anyway thanks for ur explanation. > > 1. Using Net::Telnet module, can u suggest any way so that my above > given script will work.
Check out the Expect category of programs and modules. These are designed to allow you to interact programmatically with an external program or system that expects to be interacting with a person. See, for example, Expect.pm, Net::SSH::Expect, etc. > 2. If i use "ssh" as you suggest can i send password also through the > script..? if so how? See Net::SSH::Expect. While it can be a pain, setting up a key system for ssh means you do not have to enter a password or put a password in your program file for all to see. > 3. can u pls make me clear on this line - "my $rc = $? >> 8;" The system function returns a value in the variable $? to indicate the return status of the function it called. See 'perldoc -f system' for details. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/