in reply to Re^12: Using a sting with a variable name
in thread Using a sting with a variable name

use strict 'vars'; let's the programmer know that a variable they used doesn't exist.
Could you first define what you mean by exists in this context? Because:
package main; use strict 'vars'; say $var; # Error, ($var doesn't "exist"?)
package main; use strict 'vars'; say $::var; # No error ($::var does "exist"?)
But that's clearly nonsense as in both snippets, $var and $::var are the same, and a variable cannot both exist and not exist.

Replies are listed 'Best First'.
Re^14: Using a sting with a variable name
by ikegami (Patriarch) on May 11, 2009 at 20:25 UTC

    Could you first define what you mean by exists in this context?

    You're asking the wrong person. I'm trying to satisfy the OP, and like I said before, his question was a bit vague. Perhaps he would like to know if there's exists a given variable in the program. (That can be determined by peeking at the symtab, with the caveat I previously mentioned.)