in reply to Re^2: Closure Over Scalar?
in thread Closure Over Scalar?
And missing out the + to avoid string interpolation of the bareword is something I'm likely to do.
In production code, I try never to have string literals, except where they are assigned to variables or constants. And since, in Perl, constants are a bit funny, I use scalars as being less likely to be accidentally overwritten.
I liked the idea of restricted keys, such as in Hash::Util, though I can still mistype string literals when accessing hashes, so "constant" scalars are still valuable to me.
-QM
--
Quantum Mechanics: The dreams stuff is made of
|
|---|