On Friday 23 July 2004 11:53, Bastian Angerstein wrote:
> Hello,

Hi Bastian,

>
> is it possible to execute code that is within a var?
>
> like:
>
> $var = 'print "Hallo Welt\n"';
>
> I had seen something like that in compination with eval...

something like this?

my $var = 'print "Hallo Welt\n";';
eval($var) or die "could not execute : $@";

HTH,

Philipp

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to