in reply to RE: Re: question about variabies/references (ignore my previous botched entry)
in thread question about variabies/references (ignore my previous botched entry)
As you can see, $main::{$test2} evaluates to a typeglob. Saying that $main::{$test2} = "test3" changes the scalar is technically incorrect. (Though it is what my previous answer would lead one to believe!)#!/usr/bin/perl $test1 = "value of test1"; $test2 = "test1"; $test3 = "Why are you here?"; # refers to *main::test1 print "=>$main::{$test2}<=\n"; print "Original \$test1: ...$test1...\n"; $main::{$test2} = "test3"; # $main::{"test1"} = "test1"; print "\$test1 = >>", $test1, "<<\n"; print "Main package: ", $main::test1, "\n";
Dunno where that u came from. Maybe it's a mu?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: uSymbol Table Madness
by btrott (Parson) on Apr 05, 2000 at 22:30 UTC |