I'm wondering, can I have the name of a constant, rather than the value, when the constant is a return value from a sub?
To quote specifically what I'm trying to do: I'm checking out some mail addresses with Mail::CheckUser, and I'd like to save the return code to my DB. I can get that by calling last_check()->{code}.
However, the names of the constants are much more instructive than the values (which are just numbers), so it is the name of the constants (e.g. CU_BAD_SYNTAX) that I want to save.
Is there an easy way to do this?
In reply to The name of a constant by Kjetil
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |