|Just another Perl shrine|
Re^4: why lexical variables can not be interpolated?by lightoverhead (Pilgrim)
|on Oct 21, 2013 at 17:42 UTC||Need Help??|
Thank you for your detailed answers to this question.
I know if I use a symbolic reference will get this done. But it will not work for lexical scope variable. If, for example, I use:
your solution will fail.
It seems to me that it's impossible to use /e to solve this situation when variable is lexical scoped.
Yes, sprintf will work for this case as we know it's a number; but in other cases we may not know if $AGE holds a numeric value.