For Programmers: Free Programming Magazines  


Home > Archive > PERL Modules > December 2007 > problem in telnet using perl









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author problem in telnet using perl
Srikanth M

2007-12-28, 3:59 am

im a beginner in perl. At present im working on automation of testing.

i wrote a script to add a record in a remote system and to check the
contents of the record whether it is correctly added or not.

part of my code is like this
..
..
..
#upto know the record is added successfully when i checked it manually

$t->input_log("/home/user/work/show-object");

$match='/config\/proxy\/pop3/'; #this is where the policy added in the
remote system.

$t -> cmd(Prompt => $match, String => "showtranspolicy -ruleid $ruleid
\n",Timeout =>10); #this will list the contents of the record
($ruleid) which i added earlier

sleep 1;
open($fh2, "</home/user/work/show-object") or die "could not open show-
object: $!\n";

&chkPara; # this will check the contents of the record based on the
logfile contents

$t->input_log("");

close($fh2);

#system("rm -rf /home/user/work/show-object");

&telnetclose();

My priblem is nothing is present in the logfile show-object. Can
anybody tell me where the problem

Thanks i advance,

srikanth
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com