If you want to continue using constant, and you want to interpolate within a string, the only way I know of is using the array interpolations:
use constant SOME_CONSTANT => 'the value'; print "This is @{[SOME_CONSTANT]}\n";
Within a hash key, treat it as a sub:
$h{&SOME_CONSTANT} = 'hash value';
In reply to Re: Perl "Constants"
by tprocter
in thread Perl "Constants"
by zerohero
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |