Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!usenet.ins.cwru.edu!ncoast!allbery From: allbery@NCoast.ORG (Brandon S. Allbery KB8JRR) Newsgroups: comp.lang.perl Subject: Re: defined keys that aren't defined Message-ID: <1990Dec18.234658.4197@NCoast.ORG> Date: 18 Dec 90 23:46:58 GMT References: <111562@convex.convex.com> Reply-To: allbery@ncoast.ORG.ORG (Brandon S. Allbery KB8JRR) Followup-To: comp.lang.perl Organization: North Coast Computer Resources (ncoast) Lines: 21 As quoted from <111562@convex.convex.com> by tchrist@convex.com (Tom Christiansen): +--------------- | @x{'a'..'g'} = (); | print("keys are: ", join(", ", sort keys %x), "\n"); | print((defined $x{'c'}) ? "defined" : "not defined", "\n"); | | This prints "not defined". Keys claims that there's a "c" element, | but defined says otherwise. This seems inconsistent. I'm still | looking for a useful application of this phenomenon. +--------------- Symbol tables. You've seen symbol "c", but you don't know what its value is yet. (Come to think of it, isn't this used in the current implementation of packages?) ++Brandon -- Me: Brandon S. Allbery VHF/UHF: KB8JRR on 220, 2m, 440 Internet: allbery@NCoast.ORG Packet: KB8JRR @ WA8BXN America OnLine: KB8JRR AMPR: KB8JRR.AmPR.ORG [44.70.4.88] uunet!usenet.ins.cwru.edu!ncoast!allbery Delphi: ALLBERY