Programming Languages C# Subjective
Mar 15, 2013

Assuming both a local($var) and a my($var) exist, what's the difference between ${var} and ${"var"}?

Detailed Explanation

${var} is the lexical variable $var, and ${"var"} is the dynamic variable $var.
Note that because the second is a symbol table lookup, it is disallowed under `use strict "refs"'. The words global, local, package, symbol table, and dynamic all refer to the kind of variables that local() affects, whereas the other sort, those governed by my(), are variously knows as private, lexical, or scoped variable.

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback