How will that help? Scalar::Util::readonly() is for checking whether a scalar is readonly, not for creating a readonly scalar.
I'd second the method that Zaxo suggests in his update. That's the "old-fashioned" way to create constants. Here's how to use Scalar::Util::readonly() to prove it works nicely...
perl -MScalar::Util=readonly -le '*f = \"foo"; print readonly($f)' 8388608
-sauoq "My two cents aren't worth a dime.";
In reply to Re: Re: There is a way to LOCK a SCALAR?
by sauoq
in thread There is a way to LOCK a SCALAR?
by gmpassos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |