Re: flat file db (do I need mysql?)

2002-11-10 Thread Jenda Krynicky
From: Patricia Hinman <[EMAIL PROTECTED]> > I just wrote a script that reads yahoo directories, > and writes to a temp txt file the portion of > direcetories it's currently working with. Then copies > that temp file to a completed log file, and grabs the > next subcatagory to wo

flat file db (do I need mysql?)

2002-11-08 Thread Patricia Hinman
Hi everyone, I just wrote a script that reads yahoo directories, and writes to a temp txt file the portion of direcetories it's currently working with. Then copies that temp file to a completed log file, and grabs the next subcatagory to work with. It continues till no more urls are given to fe

Re: Flat File Db

2002-07-18 Thread drieux
On Wednesday, July 17, 2002, at 07:04 , George Schlossnagle wrote: >>> The main problem appears to be that instead of taking a different branch >>> if open() or flock() fails you continue on as if they had succeeded. > > flock($fh,LOCK_EX ) is a blocking call, so it won't return until the lock

Re: Flat File Db

2002-07-18 Thread Jenda Krynicky
From: George Schlossnagle <[EMAIL PROTECTED]> > >> The main problem appears to be that instead of taking a different > >> branch if open() or flock() fails you continue on as if they had > >> succeeded. > > flock($fh,LOCK_EX ) is a blocking call, so it won't return until the > l

Re: Flat File Db

2002-07-17 Thread George Schlossnagle
>> The main problem appears to be that instead of taking a different >> branch >> if open() or flock() fails you continue on as if they had succeeded. flock($fh,LOCK_EX ) is a blocking call, so it won't return until the lock is available. // George Schlossnagle // Principal Consultant // Omni

Re: Flat File Db

2002-07-17 Thread John W. Krahn
"John W. Krahn" wrote: > > Jeff wrote: > > > > From: John W. Krahn [mailto:[EMAIL PROTECTED]] > > > > > > Jeff wrote: > > > > > > > > I'm use flat files to manage a list containing approx 25,000 records. For > > > > updates, I write to a temp file then unlink main and rename temp file to > > > >

Re: Flat File Db

2002-07-17 Thread John W. Krahn
Jeff wrote: > > From: John W. Krahn [mailto:[EMAIL PROTECTED]] > > > > Jeff wrote: > > > > > > I'm use flat files to manage a list containing approx 25,000 records. For > > > updates, I write to a temp file then unlink main and rename temp file to > > > main. I use flock for both temp and main

Re: Flat File Db

2002-07-17 Thread George Schlossnagle
_); > next unless $name eq $update; > $new_location = "palm_bay"; > $_ = join( "|", $name, $team, $new_location); > } > continue { > print OUT $_ or print "Error writing $tmp_db: $!\n"; > } > close IN; > close OUT; >

RE: Flat File Db

2002-07-17 Thread Jeff
t;; } -Original Message- From: John W. Krahn [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 17, 2002 8:11 PM To: [EMAIL PROTECTED] Subject: Re: Flat File Db Jeff wrote: > > I'm use flat files to manage a list containing approx 25,000 records. For > updates, I write to a temp

Re: Flat File Db

2002-07-17 Thread John W. Krahn
Jeff wrote: > > I'm use flat files to manage a list containing approx 25,000 records. For > updates, I write to a temp file then unlink main and rename temp file to > main. I use flock for both temp and main files during update. My main file > gets blown away on occasions. What gives? I can'

Flat File Db

2002-07-17 Thread Jeff
I'm use flat files to manage a list containing approx 25,000 records. For updates, I write to a temp file then unlink main and rename temp file to main. I use flock for both temp and main files during update. My main file gets blown away on occasions. What gives? I can't figure out why this h

RE: referencing a flat file DB

2001-06-28 Thread Jon Riddle
Hello all, I would like to take a moment to thank everyone who helped me out on my project. I am obviously new to Perl and am a total hack, but eventually, I will become proficient. For those that are wondering, my lap dance program is just a small contest for members of www.ten.com and

Re: referencing a flat file DB

2001-06-28 Thread Michael Fowler
On Thu, Jun 28, 2001 at 05:34:22PM +0100, mark crowe (JIC) wrote: > > $compare = { split (/:/, $stats)}; > > @records = \$compare; > > I think you'd be better off to use: > @records = split (/:/, $stats) While this is correct.. > At the moment you are splitting t

Re: referencing a flat file DB

2001-06-28 Thread Michael Fowler
On Thu, Jun 28, 2001 at 09:06:38AM -0700, Jon Riddle wrote: Be forewarned, what follows is a critique of code you didn't ask about. > #!/usr/local/bin/perl -w > > use CGI; > use CGI::Carp qw(carpout fatalsToBrowser); Always: use strict; when debugging code. > $Q = CGI; This assigns the

RE: referencing a flat file DB

2001-06-28 Thread mark crowe (JIC)
p it working. It's not the prettiest code I've ever seen though... Cheers Mark C > Hello everyone, > I am trying to create a simple cgi script that if a > user enters the > correct information on a contest form, they are entered into > a flat-file DB. >

referencing a flat file DB

2001-06-28 Thread Jon Riddle
Hello everyone, I am trying to create a simple cgi script that if a user enters the correct information on a contest form, they are entered into a flat-file DB. This I have conquered. My next feat is that before I write their personal information into the DB, I am comparing 3 fields from