Calling Expect script in Perl...

I call a EXPECT script from my perl script with machine IP and a FIle. The script logins to the machine and exports the value. The values to be exported or stored in a file.
I have close to 10 machines and I have created 10 files and pass the corresponding files in command line, Now I could like to do it in a single file.. so I store the Info I need in an array and then pass it instead of a file..

I will be paassing the array to my expect script. I will be calling the expect script as below from my perl script..

system("log $ip @array1");

Not sure how to read this values in arrray in expect script...
Any Ideas will be helpfull//

I didn't quite get that, use for loop from 1 to 10, or use "foreach" to read and manipulate the array.

I have stored some Info in my array(@array1) in my perl script as follows

EXPORT VAR1=
EXPORT VER2=
EXPORT VAR3=

I call my expect script in my perl script as follows

system("log $ip @array1");

So in the expect script It needs to log into the machine and then export the contents in the array to the machine.

Can we pass an array from perl script as parameter to the expect script?
Iam not sure how to read the contents in an array in expect script.

Make this array to pass those elements as parameters to the expect script, as in :
perl command expect.script parameter1 param2 param3
Then in the expect script do :

set param1 [lindex $argv 0]
set param2 [lindex $argv 1]
set param3 [lindex $argv 2]

Then manipulate those variables. Or, output the array to a file, then read it from the expect script. Then do whatever is needed.
This is just a raw logic.
P.S. if feasible, install expect module for perl, and do everything in the same perl script, though it requires more work and code redo.

Hi
I have many parameters around 10. It is not good to pass everything as parameter.
I do not want to keep seprate files also. Hence thinking about passing in array from perl script ...
Is that possible...