in reply to Dereferencing simple variable
However if you insist on doing that, you should look into symbolic references (see perlref). They only work with package variables, however (not those created with my). This seems to work:
my $test = "help"; our $help = 1; no strict 'refs'; if(defined($$test)){ print "defined\n"; };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Dereferencing simple variable
by chrishowe (Acolyte) on Apr 01, 2009 at 14:03 UTC |