my $someVar = "someValue"; sub get_cnst { return $someVar; }
In this way, the variable is readable but not writable from outside the module. Is there a particular reason it needs to be a simple scalar?
In reply to Re: How do I initiate a constant with variable value?
by kennethk
in thread How do I initiate a constant with variable value?
by accessdenied
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |