Re: Effective search of text file

2007-12-12 Thread Dr.Ruud
John W . Krahn schreef: > Dr.Ruud: >> my $filename = "test.db"; >> open my $fd, "<", $filename >> or die "'$filename': $!"; >> >> (yes, I prefer Texan quotes nowadays :) > > Is that Dutch slang? I have never heard that expression before. I paraphrased on a recent discussion in p6lang.

Re: Effective search of text file

2007-12-12 Thread Chas. Owens
On Dec 12, 2007 8:46 AM, John W. Krahn <[EMAIL PROTECTED]> wrote: > On Wednesday 12 December 2007 04:03, Dr.Ruud wrote: snip > > or die "'$filename': $!"; > > > > (yes, I prefer Texan quotes nowadays :) > > Is that Dutch slang? I have never heard that expression before. > snip Some people c

Re: Effective search of text file

2007-12-12 Thread John W . Krahn
On Wednesday 12 December 2007 04:03, Dr.Ruud wrote: > jeff pang schreef: > > open FD,"test.db" or die $!; > > Jeff, could you please start using lexical filehandles, more > whitespace, and 3-argument opens, when publishing example code on > this list? > > my $filename = "test.db"; > open my $fd

Re: Effective search of text file

2007-12-12 Thread Chas. Owens
On Dec 12, 2007 8:12 AM, jeff pang <[EMAIL PROTECTED]> wrote: > > --- "Chas. Owens" <[EMAIL PROTECTED]> wrote: > > The only reason to use any version earlier than 5.6.3 > > is > > that your sysadmins won't upgrade an ancient box (and even then it > > is > > time to quit that job because if they are

Re: Effective search of text file

2007-12-12 Thread jeff pang
--- "Chas. Owens" <[EMAIL PROTECTED]> wrote: > The only reason to use any version earlier than 5.6.3 > is > that your sysadmins won't upgrade an ancient box (and even then it > is > time to quit that job because if they are that stupid then there > are > probably other issues as well). > mhh? if

Re: Effective search of text file

2007-12-12 Thread Chas. Owens
On Dec 12, 2007 7:30 AM, jeff pang <[EMAIL PROTECTED]> wrote: snip > I'd like. But I learned perl from 2002 year, I even don't know what's > perl 4. snip Some features you would have to stop using: * lexical variables (i.e. my) * multidimensional arrays and nested hashes * real (vs symbolic) refer

Re: Effective search of text file

2007-12-12 Thread jeff pang
--- "Chas. Owens" <[EMAIL PROTECTED]> wrote: > Failing backwards > compatibility > with an ancient version of Perl is not a bad thing. Or do you also > support Perl 4? > I'd like. But I learned perl from 2002 year, I even don't know what's perl 4. Best Regards, Jeff (joy) Peng __

Re: Effective search of text file

2007-12-12 Thread Chas. Owens
On Dec 12, 2007 7:09 AM, jeff pang <[EMAIL PROTECTED]> wrote: > > --- "Dr.Ruud" <[EMAIL PROTECTED]> wrote: > > > jeff pang schreef: > > > > > open FD,"test.db" or die $!; > > > > Jeff, could you please start using lexical filehandles, more > > whitespace, > > and 3-argument opens, > > Ok I can but

Re: Effective search of text file

2007-12-12 Thread jeff pang
--- "Dr.Ruud" <[EMAIL PROTECTED]> wrote: > jeff pang schreef: > > > open FD,"test.db" or die $!; > > Jeff, could you please start using lexical filehandles, more > whitespace, > and 3-argument opens, Ok I can but I don't like. When I uploaded my cpan module with a lexical FH and 3 args open,

Re: Effective search of text file

2007-12-12 Thread Dr.Ruud
jeff pang schreef: > open FD,"test.db" or die $!; Jeff, could you please start using lexical filehandles, more whitespace, and 3-argument opens, when publishing example code on this list? my $filename = "test.db"; open my $fd, "<", $filename or die "'$filename': $!"; (yes, I prefer Te

Re: Effective search of text file

2007-12-12 Thread Chas. Owens
On Dec 11, 2007 6:26 PM, Why Tea <[EMAIL PROTECTED]> wrote: > I have a text file of acronyms of about 2MB, I would like to write a > cgi script to allow users to query for any acronym in the text file. > What is the best way of implementing it (i.e. taking the acronym as a > key to search for the e

Re: Effective search of text file

2007-12-12 Thread jeff pang
--- Why Tea <[EMAIL PROTECTED]> wrote: > I have a text file of acronyms of about 2MB, I would like to write > a > cgi script to allow users to query for any acronym in the text > file. > What is the best way of implementing it (i.e. taking the acronym as > a > key to search for the expanded text)

Effective search of text file

2007-12-12 Thread Why Tea
I have a text file of acronyms of about 2MB, I would like to write a cgi script to allow users to query for any acronym in the text file. What is the best way of implementing it (i.e. taking the acronym as a key to search for the expanded text)? /Why Tea -- To unsubscribe, e-mail: [EMAIL PROTEC