Hi,

I've got this code:

#Example of generated code. I have little influence over the actual code in
the variable. It's generated from a template.
$generatedCode = '$test = "some result"; print "test is: $test";';

open MYFILE, ">somefile";
select(MYFILE);
my $testvar = eval "$generatedCode";
select(STDOUT);
close MYFILE;

this prints the result of the generated code in a file called somefile. Is
there any way in which I can store the output from the
eval "$generatedCode";
in a variable, be it a string or an array, instead of in a file? I have to
do this a lot , and having a file in between slows the code quite a bit.

Thanks,
Bas



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

Reply via email to