Hi
I need some help to use the already existing expect code in perl. I have tried Expect.pm, but it asks to write the code in a particular format newly but i want to use the already existing expect code.

      I have a piece of script written in Expect.
The structure of the code is something like this:
   #!/usr/bin/expect
   set a 10
   set ...
   set ....
   .
   .
   #A very Long common Assignment Part
   .
   .
   .
   #"Title1: Case1 Execution"
   {
      code for case1
   }

   #"Title2: Case2 Execution"
   {
      code for case2
   }

Things I need to do:
* Fetch All the Title lines alone from the script and display using Perl ListBox control ( This I can Manage) * Whenever I click on the particular Title and press execute, the part of code for the case needs to be executed * The problem is, I dont want to run the Long assignment part again and again while executing each case. The assignments are common and take a long execution time. What I need is a way that will help me to execute the Long part only once and keep them in memory, and each time it is sufficient only to execute only the 'code for the case'

In short I require a way to embed Expect interpreter inside perl, just something like Tcl-0.91 module in CPAN does for TCL interpreter.

Any Help will be greatly appreciated.

Thanks,
SR.

Reply via email to