in reply to Fill in the missing features from your other script language

Um, this doesn't do much good without your MyScriptUtils module. Care to post that too?

Replies are listed 'Best First'.
Re^2: Fill in the missing features from your other script language
by dimar (Curate) on Sep 16, 2004 at 20:19 UTC

    The module has a bunch of other mundane stuff that is not directly relevant to this coolness. Nevertheless, the MyScriptUtils::RunTempScript function is *very* simple

    It simply: 1) takes the input string (FooScript code); 2) saves it to a temp file (eg "c:\temp.foos") and; 3) runs the temp file we just created by using the perl 'system' command.

    system "$sBinPath $sTempFile";

    The code is pretty trivial, also, people have their own preferences regarding how to make a temp file, whether or not to use the 'system' command (eg for security reasons) and other side issues that are useful to bring up, but secondary to the original intent to just get the main idea out in the open.

    It should be added that this is not a preferred method, but a klunky workaround if your scripting environment doesn't support OLE, CORBA, XMLRPC, or other Perl-compatible interop facility for getting stuff into and out.