As usual there are many ways to do it.  I haven't done much with opening
files for read and write at the same time, so someone else will have to
provide ideas for that.

I would either read in the whole file, then rewrite the whole file... or use
DBI (assuming the file is CSV).

If you read in the whole file and rewrite it make sure you flock it (see
perldoc -f flock).

If you try the DBI approach you can use the DBD::CSV driver:
http://search.cpan.org/doc/JZUCKER/DBD-CSV-0.2002/lib/DBD/CSV.pm

Rob


-----Original Message-----
From: senrong [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 9:27 AM
To: [EMAIL PROTECTED]
Subject: Simple question need ans


I am writing a simple program that update and search a text file for names
and telephone number....

I just want to change the number in the text file of a person....How do I do
it?

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to