sherif1980
Technical User
Hello everyone,
I wrote a script in which I generate a file and call an external program with the generated file as the argument
To be more specific here is the part of the relevant code:
open (f, '>temp.sp');
print f @data_in ;
@data_out = `hspice temp.sp`;
The external program (hspice_ expects the first argument to be a file. This part of the code is called many times within the script and I am trying to reduce the runtime of the script. I have two questions
1-Is it possible to redirect the input to the external program from a file to an array variable and how can that be done in Perl?
2-Is it possible to keep the external program loaded in memory from the start till the end of the script in order to avoid the overhead of reloading the external program each time it is called and how can that be done?
Thank you so much for your time
Sherif
I wrote a script in which I generate a file and call an external program with the generated file as the argument
To be more specific here is the part of the relevant code:
open (f, '>temp.sp');
print f @data_in ;
@data_out = `hspice temp.sp`;
The external program (hspice_ expects the first argument to be a file. This part of the code is called many times within the script and I am trying to reduce the runtime of the script. I have two questions
1-Is it possible to redirect the input to the external program from a file to an array variable and how can that be done in Perl?
2-Is it possible to keep the external program loaded in memory from the start till the end of the script in order to avoid the overhead of reloading the external program each time it is called and how can that be done?
Thank you so much for your time
Sherif