Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: question regarding "Tie" in Perl

by BrowserUk (Pope)
on Nov 04, 2013 at 20:25 UTC ( #1061200=note: print w/ replies, xml ) Need Help??


in reply to Re^2: question regarding "Tie" in Perl
in thread question regarding "Tie" in Perl

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 }";;

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.


Comment on Re^3: question regarding "Tie" in Perl
Select or Download Code
Replies are listed 'Best First'.
Re^4: question regarding "Tie" in Perl
by lightoverhead (Monk) on Nov 04, 2013 at 20:31 UTC

    BrowserUk

    Thank you man. You proved your point.

    I like the cute "${\AVO}".

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1061200]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (11)
As of 2015-07-28 09:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (254 votes), past polls