PriNet has asked for the wisdom of the Perl Monks concerning the following question:
ok, heres a good one... can i place a "statement" inside a string then "execute" that string? i'm using an external file for the additional statements for the original script and therefore cannot use the "eval" function, because it never comes back to my original script. my goal is to be able to provide specific perl script "modules" for different cases in the "original" script. Example:
$Dummy = "\$Object = \"testing\";"; #assign a perl statement to '$D +ummy' $Dummy; #execute the perl statement that is 'inside +' $Dummy
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: staements in strings
by wfsp (Abbot) on May 14, 2011 at 08:37 UTC | |
|
Re: staements in strings
by LanX (Saint) on May 13, 2011 at 21:25 UTC | |
by PriNet (Monk) on May 13, 2011 at 21:54 UTC | |
by LanX (Saint) on May 14, 2011 at 08:33 UTC | |
by LanX (Saint) on May 13, 2011 at 22:01 UTC | |
by PriNet (Monk) on May 13, 2011 at 22:33 UTC | |
by PriNet (Monk) on May 13, 2011 at 22:18 UTC | |
by PriNet (Monk) on May 13, 2011 at 21:59 UTC | |
|
Re: staements in strings
by Plankton (Vicar) on May 13, 2011 at 21:21 UTC | |
by PriNet (Monk) on May 13, 2011 at 21:28 UTC |