perlquestion
tune
Dear Monks!
<p>
I have a task to parse some PHP codes and mine some system-wide constants out and apply it in my Perl code as own constants.
<br>
I think it is possible by parsing out the constant name, and value from the PHP file, and then eval a constant declaration.
<br>But the Perl interpreter thinks otherwise:
<code>
eval "use constant CONST1=>5" or warn $@; # when I run this I get: Warning: something's wrong at ./consteval.pl line 3.
</code>
So what's wrong?
<p>--
<br>
tune