#!/usr/bin/perl #use Time::Format; BEGIN { push(@INC,'/usr/lib/perl5/site_perl/5.8.0/URI/'); } require "Telnet.pm"; #Initialise telnet $telnet = new Net::Telnet->new( Timeout=>20,Prompt => '/[\$%#>] $/'); die &Log_Message("Can't open telnet session to the remote host") unless $telnet; #Telnet and login to a remote machine $telnet->open("systst-lnx-15"); $telnet->login("root","novell"); print "Logged into the system \n"; #After a successful telnet create the file /my-perl at the remote host. $telnet->cmd("touch /my-perl"); $telnet->close;