in reply to Re: print_notice or print $notice or print notice?
in thread print_notice or print $notice or print notice?

The use statements are compile time so trying to define constants based on runtime data as in your example is not going to work as you might expect. You'd want to wrap up any code to determine the $notice in a BEGIN block and follow it up with a use constant NOTICE => $notice;