However, this implementation has advantage of using the tied variable as constant in a string which can be interpolated.
And the benefit of interpolating a compile-time constant into a string at runtime is?
use constant AVO => 6; ... print "The constant is " . AVO . "\n";
Or
printf "The constant is %d\n", AVO; print "The constant is ${ \AVO }";;
In reply to Re^3: question regarding "Tie" in Perl
by BrowserUk
in thread question regarding "Tie" in Perl
by lightoverhead
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |