use constant DEBUG => $ENV{MY_DEBUG}; # ... DEBUG and print "something\n";