DanNeedles has asked for the wisdom of the Perl Monks concerning the following question:
Here is the output:# USING PREDECLARATIONS IT FAILS my $x=""; my $another=""; print "WITH PREDECLS\n"; $x->{"FISH2"} = "FISH2"; $another->{"NONE"}="NONE"; foreach $item (keys %{$x}) { print "ELEMENTS: $item, $x->{$item}\n"; } # NOT USING PREDECLARATIONS IT WORKS print "\n\nWITHOUT PREDECLS\n"; $x2->{"FISH2"} = "FISH2"; $another2->{"NONE"}="NONE"; foreach $item (keys %{$x2}) { print "ELEMENTS: $item, $x2->{$item}\n"; }
WITH PREDECLS ELEMENTS: NONE, NONE ELEMENTS: FISH2, FISH2 WITHOUT PREDECLS ELEMENTS: FISH2, FISH2
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Active State Perl 5.6.1 build 626 Trashes hashes.
by runrig (Abbot) on Aug 08, 2001 at 20:48 UTC | |
by Anonymous Monk on Aug 08, 2001 at 21:55 UTC | |
by runrig (Abbot) on Aug 08, 2001 at 23:30 UTC | |
by John M. Dlugosz (Monsignor) on Aug 09, 2001 at 07:05 UTC | |
|
Re: Active State Perl 5.6.1 build 626 Trashes hashes.
by rchiav (Deacon) on Aug 08, 2001 at 21:00 UTC | |
|
Re: Active State Perl 5.6.1 build 626 Trashes hashes.
by John M. Dlugosz (Monsignor) on Aug 09, 2001 at 07:03 UTC |