[cgiapp] Interactive input via telnet

Yona Eilat Yonae at fundtech.co.il
Sun Nov 4 09:14:30 EST 2007


 
 
Hi,
 
I'm writing Perl program that running on Windows and should connect to
UNIX via Telnet module.
The telnet command should to  execute tuxedo command on Unix side  as
describe below:
 
 
$telnet->cmd("/opt/bea/tuxedo8.1/bin/tmloadcf  GPPconfig.ubb");
 
my question is how can I interactive with the tuxedo command, means to
send an answer as describe below:
 
                             /opt/bea/tuxedo8.1/bin/tmloadcf
GPPconfig.ubb
                            Really overwrite TUXCONFIG file:
/users2/tec3/fundtech/env/GPPconfig [y, q] ? 
 
Please advice how can i send/approve the question , or enable the user
to answer the question online.
below is the part of my program that handling the telnet issues:
 

			    # Connect
---------------------------------------------------------------- #

			    print "Connecting to
$hostname($username:$password)...\n";

			    $telnet = Net::Telnet->new( Timeout =>
$timeout,

	
Prompt => '/[\$%#>] $/' , # The default Prompt is '/[\$%#>] $/'

			                                            Host
=> $hostname );

			

			    $telnet_put = Net::Telnet->new( Timeout =>
$timeout,

	
Prompt => '/[\$%#>] $/' , # The default Prompt is '/[\$%#>] $/'

			                                            Host
=> $hostname );

			

			    $telnet->login($username, $password);

			    print "Login successfully.\n";

			

			    @results =  $telnet->cmd("cd $envPath");

			

			

	
$telnet->cmd("/opt/bea/tuxedo8.1/bin/tmloadcf GPPconfig.ubb");

    
Thanks,
Yona


More information about the cgiapp mailing list