Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!ncar!gatech!usenet.ins.cwru.edu!ncoast!allbery From: allbery@NCoast.ORG (Brandon S. Allbery KB8JRR/AA) Newsgroups: comp.lang.perl Subject: Re: Pattern matching of a large dbm file (slow indexing) Message-ID: <1991May6.230158.21208@NCoast.ORG> Date: 6 May 91 23:01:58 GMT References: <1991May6.163310.21805@ccu.umanitoba.ca> Reply-To: allbery@ncoast.ORG (Brandon S. Allbery KB8JRR/AA) Followup-To: comp.lang.perl Organization: North Coast Public Access Un*x (ncoast) Lines: 27 As quoted from <1991May6.163310.21805@ccu.umanitoba.ca> by rahardj@ccu.umanitoba.ca (Budi Rahardjo): +--------------- | Assigning the index/keys to an array takes forever ... , never mind | doing the matching. +--------------- Standard dbm is slow. +--------------- | Is there a way I can iterate over dbm file without stepping thru | the index/keys ? (Basically doing a 'grep' on the contents). | Or maybe read the raw-dbm file (without the index), ie treat it | as a flat file ... +--------------- Dbm files aren't stored in any format that's meaningful to humans. You can combine the search with the processing, if it will make things faster: the "each" operator returns the next available value each time it is called, instead of doing it all at once. Check the manual. ++Brandon -- Me: Brandon S. Allbery Ham: KB8JRR/AA 10m,6m,2m,220,440,1.2 Internet: allbery@NCoast.ORG (restricted HF at present) Delphi: ALLBERY AMPR: kb8jrr.AmPR.ORG [44.70.4.88] uunet!usenet.ins.cwru.edu!ncoast!allbery KB8JRR @ WA8BXN.OH