Is this a bug in Perl (nested hash)?

Chris Radcliff chris at binevolve.com
Wed Apr 12 12:12:22 CDT 2000


~sdpm~

Alan Stewart wrote:
> I ran it and got:
> C: true
> F: true
> 
> KEYS
> key0
> key1
> 

Whoops! Of course, that's what I actually got as well. I processed it
through a Web script which ate up the C: and F: lines as headers, which
goes to show that Perl debugging is not a recommended early-morning
activity.

> Chris, what is the actual value of $hash{key0} and $hash{key1} for you?
> 

from http://www.globalspin.com/tryme.vep :
The value of key0 is HASH(0x82c4acc).
The value of key1 is HASH(0x832ad78).

...which is again what I would expect. The expression $hash{key0}{key00}
implies a reference at $hash{key0}, so Perl obligingly creates one. This
might be considered a bug, but I'd rather just see a warning about it.
I'm disappointed that one doesn't show up.

~chris
~sdpm~

The posting address is: san-diego-pm-list at hfb.pm.org

List requests should be sent to: majordomo at hfb.pm.org

If you ever want to remove yourself from this mailing list,
you can send mail to <majordomo at happyfunball.pm.org> with the following
command in the body of your email message:

    unsubscribe san-diego-pm-list

If you ever need to get in contact with the owner of the list,
(if you have trouble unsubscribing, or have questions about the
list itself) send email to <owner-san-diego-pm-list at happyfunball.pm.org> .
This is the general rule for most mailing lists when you need
to contact a human.




More information about the San-Diego-pm mailing list