Read Write to file .. need help

2005-01-14 Thread Luinrandir Hernsen
I need to read and write to a file before allowing the anyone else to read or write. I found this on the web.. but it does not work...maybe its my version of perl? http://htmlfixit.com/cgi-tutes/tutorial_Perl_Primer_011_File_manipulation_with_Perl.php File Operation modes: open: $filepath

Re: Read Write to file .. need help

2005-01-14 Thread Ovid
Hi Luinrandir, Anyone know about this? or can I just: #Open to read open (DataFile, $_[0])||die Sorry, I can't open $_[0]\n; flock (DataFile,2); @Data =DataFile; #open to write open DataFile, $_[0])||DieNice3(Can't write to $_[0]); flock (DataFile,2); foreach $Data(@Data) {

RE: Read Write to file .. need help

2005-01-14 Thread Graeme St. Clair
in a more comfortable chair... Rgds, GStC. -Original Message- From: Ovid [mailto:[EMAIL PROTECTED] Sent: Friday, January 14, 2005 2:47 PM To: Luinrandir Hernsen; beginners-cgi@perl.org Subject: Re: Read Write to file .. need help snip/ Reading and writing files from CGI scripts can