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