hash value and grep / get some files searched and indexed

2006-04-07 Thread Alan_C
Hi, each file name begins with xtst of which I've near 18 of these small files (for example, xtst033006, xtst040106, xtst022406 etc. etc.) these text files may contain code snippet and/or help, howto info within the first 6 lines of each of these files there is a keyword line that begins with

Re: hash value and grep / get some files searched and indexed

2006-04-07 Thread John W. Krahn
Alan_C wrote: > Hi, Hello, > each file name begins with xtst of which I've near 18 of these small files > (for example, xtst033006, xtst040106, xtst022406 etc. etc.) > > these text files may contain code snippet and/or help, howto info > > within the first 6 lines of each of these files there

Re: hash value and grep / get some files searched and indexed

2006-04-08 Thread Alan_C
On Friday 07 April 2006 03:34, John W. Krahn wrote: > Alan_C wrote: > > Hi, > Hello, [ snip ] > > my @keys = sort keys %data; I find learning how to write Perl a bit spacey -- and also, not unlike that of learning in the sport of skiing where "I fell down a lot when I was learning the moguls."

Re: hash value and grep / get some files searched and indexed

2006-04-08 Thread Jaime Murillo
On Saturday 08 April 2006 01:08, Alan_C wrote: > On Friday 07 April 2006 03:34, John W. Krahn wrote: > > Alan_C wrote: > > > Hi, > > > > Hello, > > [ snip ] > > #!/usr/bin/perl -w > > use strict; > > > > @ARGV = glob 'xtst*'; > > > > my %data; > > > > while ( <> ) { > > my ( $key, @keywords )

Re: hash value and grep / get some files searched and indexed

2006-04-09 Thread Alan_C
On Saturday 08 April 2006 01:08, Alan_C wrote: > On Friday 07 April 2006 03:34, John W. Krahn wrote: > > Alan_C wrote: > > > Hi, > > > > Hello, Hi. Thanks for the help. I've got a (Linux platform) working solution with the improvements that I mentioned are onto it. When searching (enter on com

Re: hash value and grep / get some files searched and indexed

2006-04-09 Thread John W. Krahn
Alan_C wrote: > > Hi. Hello, > Thanks for the help. I've got a (Linux platform) working solution with > the improvements that I mentioned are onto it. > > When searching (enter on commandline) multiple words it can print out several > listings of the same xtst file due to I use some cross re

Re: hash value and grep / get some files searched and indexed

2006-04-10 Thread Alan_C
On Sunday 09 April 2006 19:34, John W. Krahn wrote: > Alan_C wrote: > > Hi. > [ . . ] > This may be close to what you want: Very nearly exactly. It's very fast and without a pre created index file as well. Likely is portable to other platform too. I admit mine a bit hunky in places -- but it

Re: hash value and grep / get some files searched and indexed

2006-04-10 Thread Jaime Murillo
On Monday 10 April 2006 01:20, Alan_C wrote: > On Sunday 09 April 2006 19:34, John W. Krahn wrote: > > Alan_C wrote: > > > Hi. > > #!/usr/bin/perl -w > > use strict; > > > > my @search4 = @ARGV;# keywords > > > > @ARGV = glob 'xtst*'; > > my @lines; > > while ( <> ) { > > if ( s/^#:// ) {

Re: hash value and grep / get some files searched and indexed

2006-04-11 Thread Alan_C
Thanks to Mr. Krahn and Jaime Murilllo! Yeee Ha!!! (also, a couple more ques. about the code if I may, further below) I got the output that I want: [EMAIL PROTECTED]:~$ grepf6tst hash 1 'hash' array of hashes 2 'hash' initialize sort and print hash 3 'hash' ref deref hash array it