tune has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks!

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.
I think it is possible by parsing out the constant name, and value from the PHP file, and then eval a constant declaration.
But the Perl interpreter thinks otherwise:

eval "use constant CONST1=>5" or warn $@; # when I run this I get: +Warning: something's wrong at ./ line 3.
So what's wrong?