Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!ogicse!iwarp.intel.com!news From: merlyn@iwarp.intel.com (Randal Schwartz) Newsgroups: comp.lang.perl Subject: Re: Perl PL 28 fails op.dbm on SparcStation 1 Keywords: ndbm; core; blooie Message-ID: <1990Aug24.182346.1840@iwarp.intel.com> Date: 24 Aug 90 18:23:46 GMT References: <1990Aug17.031514.14790@midway.uchicago.edu> <1990Aug21.203346.598@maths.tcd.ie> <1990Aug24.061936.7472@alembic.acs.com> Sender: news@iwarp.intel.com Reply-To: merlyn@iwarp.intel.com (Randal Schwartz) Organization: Stonehenge; netaccess via Intel, Beaverton, Oregon, USA Lines: 25 In-Reply-To: csu@alembic.acs.com (Dave Mack) In article <1990Aug24.061936.7472@alembic.acs.com>, csu@alembic (Dave Mack) writes: | Me too, on a Sun-4/110 running SunOS4.1, and it also passes op.dbm. | Unfortunately, it appears that delete, when applied to an assoc | array (from dbm), deletes the wrong entry in the database. | | In particular, this code, which worked perfectly under Perl3.18, | very quietly does the wrong thing: [and don't the hundreds of alt.personals readers know it!!] Larry (who is probably posting the very same response) told me that it was a problem introduced by an optimization he made in the last megapatch that makes "defined %foo" be false until its first assignment (because someone complained about that). Unfortunately, he missed that a dbmopen(foo,...) is an assignment, and so the data structures never got initialized. The workaround until the next patch is to assign an artificial value right after the dbmopen and then delete it back out (I hope that's what he said :-). I think somebody else already pointed that out too. $JAPH = "print 'Just another Perl hacker,'"; eval $JAPH -- /=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: "Welcome to Portland, Oregon, home of the California Raisins!"=/