View Single Post
  #2   (View Single Post)  
Old 16th February 2009
qsecofr qsecofr is offline
Port Guard
 
Join Date: May 2008
Location: Portland
Posts: 18
Default

I may have found the answer here:
http://www.arl.wustl.edu/projects/fp...og/ch05_01.htm

ex.

Code:
# put some code inside $str
$str = '$c = $a + $b'; # Perl doesn't care what's inside $str
$a = 10; $b = 20;
eval $str;             # Treat $str as code, and execute it.
print $c;              # prints 30
Reply With Quote