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

Re: [MacPerl] Search::Dict?



On 2/11/1999 at 17:06, pudge@pobox.com (Chris Nandor) wrote:

> No -w?
> 
Yes, I use -w but omitted #!/usr/bin/perl -w from the post because it's followed
by several lines of comments.

> >if (look <F>, $key, $dict, $fold)  {
>           *F
> 
> I didn't look at the rest.  Try that, and see if it works.
> 
> <F> means "return one (in scalar context) or all (in list context) of the
> lines from filehandle F".  You want to pass *F, as the docs say.
I see what you mean and just missed the *. Now I am baffled by what this
actually means and can't find anything about it in Camel or your book. What's
the story?

After changing to *F, it's still not working right, but now it's returning line
0 instead of 701, so I guess we're making "progress?" Perhaps I'm just not
thinking about this whole thing correctly- given that all I want to do is
extract a given line of text from a file based on a key and print the key and
the value, would I be better off just using a normal hash? I guess what I am
trying to ask if DB_File expects you to tell it what line number you want,
what's the most efficient way to figure out which line that is and (this is
where I'm getting confused) if you have to read the file using another method
anyway in order to get that line number, what is the point of using DB_File to
extract the line?

Thanks.

Richard Gordon
Gordon Consulting & Design
Voice: 770-565-8267  Fax: 770-971-6887



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