### ### main: ### - name: tryRunTempScript001 ### desc: use perl to generate a script in another language ### date: Thu Sep 16 09:09:11 2004 ### ### begin_: init perl script use strict; use warnings; use lib "c:/MyPerlStuff/lib"; use MyScriptUtils; ### begin_: main perl code my $bin = "c:/FooScript/FooScript.exe"; my $ext = '.foos'; my $dd = {}; $dd->{random} = int(rand(200)); MyScriptUtils::RunTempScript(TempScript($dd), $bin , $ext); ### begin_: subroutine to define the FooScript script code sub TempScript { my $dd = shift; my $strOut = "" ### İİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİ ### İİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİ .qİ ### FooScript script language does not allow us to generate ### random numbers, so we let perl fill in the missing ### features. FooPrint("The random number is: İ.$dd->{random}.qİ") İ; ### İİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİ ### İİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİİ return($strOut); }###end_sub