Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

running an external program

Status
Not open for further replies.

sherif1980

Technical User
Joined
Nov 12, 2006
Messages
1
Location
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top