> Andrew Shitov wrote:
> >> This will call a new perl process, and may be more expensive on the 
> >> system. On the other hand I can do
> > 
> > <...>
> > 
> >> But How do I get the reponse of the script.
> > 
> > 
> > Probably the simpliest way is to make called script a module and run it 
> > using either 'use' or 'require'.
> > 
> 
> Precisely , But That is something I cannot do because the script is in a 
> file which is written on the fly by the client end settings.
> 
> Ideally it should have been such a way that The client settings are 
> written into a configuration file  and the program reads the 
> configuraton file and runs the condition.
> 
> The point over here is , Is it possible to use the existing instance of 
> perl running main to run the child program and return the output
> 

'require' is runtime not compile time, so assuming you can regulate the
sequence of events, aka the file is known to be written (or testable in
a loop) before the call to require then this will still work even if the
file does not exist at runtime.  If you are worried about the require
failing because of a missing file then wrap the whole construct in an
'eval' and catch the exceptions (which you should do anyways). 

... still isn't a compelling reason to call one Perl script from another...

http://danconia.org


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to