Scarborough has asked for the wisdom of the Perl Monks concerning the following question:
Back in main I have the following code#%vars has the structure $vars{$name} = [$local, $value] return \%vars
Not what I expected. Am I dereferencing the hash incorrectly? One last note the code and sub are called from a button press in a Tk GUI if that has any relevents.my $vars = get_vars_hash($file); Dumper(\%$vars); #just for testing. #outputs #$var1 = { # 'DATE'=>[ # 'G234_DATE', # 'ZERO' # ], # 'STOP'=>[ # 'G234_STOP'' # '60' # ] # } #Which is what I expected foreach $key (keys(%$vars)){ print "$key\n"; } #outputs #DATE #ARRAY(0x1df50b0) #STOP #ARRAY(0x1df5074)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Whats happening to my hash ref.
by tinita (Parson) on Jun 01, 2004 at 12:03 UTC | |
by Scarborough (Hermit) on Jun 01, 2004 at 14:21 UTC | |
|
Re: Whats happening to my hash ref.
by BUU (Prior) on Jun 01, 2004 at 11:01 UTC | |
|
Re: Whats happening to my hash ref.
by Aragorn (Curate) on Jun 01, 2004 at 11:22 UTC | |
|
Re: Whats happening to my hash ref.
by El Linko (Beadle) on Jun 01, 2004 at 11:28 UTC |