Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucsd!ucbvax!iwarp.intel.com!news From: merlyn@iwarp.intel.com (Randal L. Schwartz) Newsgroups: comp.lang.perl Subject: Re: undef of dbm elements? Message-ID: <1991Jan2.194055.23359@iwarp.intel.com> Date: 2 Jan 91 19:40:55 GMT References: <5073@atexnet.UUCP> Sender: news@iwarp.intel.com Reply-To: merlyn@iwarp.intel.com (Randal L. Schwartz) Organization: Stonehenge; netaccess via Intel, Beaverton, Oregon, USA Lines: 32 In-Reply-To: lawrence@epps.kodak.com (Scott Lawrence) In article <5073@atexnet.UUCP>, lawrence@epps (Scott Lawrence) writes: | | 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"? I dunno. It might give the "undef" value to $Control{"foo"}. But I don't know how that would be stored on disk. | If not, is there a way to do so? delete $Control{"foo"} is the proper way. Removes "foo" from keys(%Control), and on disk too. ObJAPH: print "Just another Perl hacker," -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Intel: putting the 'backward' in 'backward compatible'..."====/