Or you could examine %constant::declared.
In reply to Re^2: Constant name stored in a string by WizardOfUz in thread Constant name stored in a string by SBECK