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
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
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."
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 )
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
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
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
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/^#:// ) {
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