- Original Message -
From: Chris Devers <[EMAIL PROTECTED]>
Date: Wednesday, January 12, 2005 7:54 pm
Subject: Re: Execute a perl array
> On Wed, 12 Jan 2005 [EMAIL PROTECTED] wrote:
>
> > Just thought of a better question, how can you check if perl
> code i
On Wed, 12 Jan 2005 [EMAIL PROTECTED] wrote:
> Just thought of a better question, how can you check if perl code is
> valid with out executing it [ I guess the question may be, can you
> interpelate with out executing ] ??
The tools for answering this yourself are in your hands:
Try:
$ pe
- Original Message -
From: Groleo Marius <[EMAIL PROTECTED]>
Date: Wednesday, January 12, 2005 1:55 am
Subject: Execute a perl array
> Hi list! ( as usual )
Hello
> i have a simple question : how can i execute an array, knowing
> that it
> contains perl code?
Just thought of a beter q
Groleo Marius <[EMAIL PROTECTED]> asked:
> i have a simple question : how can i execute an array,
> knowing that it contains perl code?
Assuming you meant a Perl script, not bytecode:
eval join("\n",@code);
Read all about it with "perldoc -f eval".
HTH,
Thomas
--
To unsubscribe, e-ma
On Wed, 12 Jan 2005 08:55:14 +0200, Groleo Marius <[EMAIL PROTECTED]> wrote:
> Hi list! ( as usual )
> i have a simple question : how can i execute an array, knowing that it
> contains perl code?
eval for @array;
Example:
tor% perl -e '@array = ("print \"hi!\n\"", "print \"hello\n\""); eval
for @