[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Search::Dict?



Richard Gordon writes on 2/12/99 (around 1:40 PM -0500):
> On 2/12/1999 at 10:33, rjk@linguist.dartmouth.edu (Ronald J. Kimball) wrote:
>
> > Where did you get the idea that you need the line number anyway?  DB_File
> > is just a way of tying a hash to a file.  You get values out a tied hash
> > the same way you get them out of a regular hash: $foo{key}.
>
> I was going by an example in the Perl Cookbook. I think I understand this
>now.
> Thanks.

To hopefully clarify this idea -- DB_File can *also* be used to tie an
array to a regular textfile, which is where the line numbers come in. You
can then read (or alter) the file using a regular array, e.g. $foo[5].

Roger




***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch