Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!jarthur!uunet!convex!news From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.lang.perl Subject: Re: undef of dbm elements? Message-ID: <1991Jan02.205309.12903@convex.com> Date: 2 Jan 91 20:53:09 GMT References: <5073@atexnet.UUCP> Sender: news@convex.com (news access account) Reply-To: tchrist@convex.COM (Tom Christiansen) Organization: CONVEX Software Development, Richardson, TX Lines: 21 Nntp-Posting-Host: pixel.convex.com From the keyboard of lawrence@epps.kodak.com: :The perl man page says "Undef will pobably not do what you expect on ... dbm :array values". :What exactly _does_ it do? :Given : dbmopen( %Control, "dbmfilename", 0660 ); :will : undef $Control{ "foo" }; :remove the key (and associated value) "foo" from the file "dbmfilename"? :If not, is there a way to do so? :Please reply by mail - I will summarize to the net. I tried to reply but the mail bounced. You want to use delete, not undef, to get rid of it entirely. Otherwise you'll have a key whose value is undef, as opposed to not having the key at all. --tom -- Tom Christiansen tchrist@convex.com convex!tchrist "With a kernel dive, all things are possible, but it sure makes it hard to look at yourself in the mirror the next morning." -me