in reply to Re: FreeBSD reading/writing workaround?
in thread FreeBSD reading/writing workaround?
Now, i can open the file for reading, and i can open it for writing, and both work fine. But when I try reading AND writing, it doesnt spring an error, it simply doesnt read anything from or write anything to the file. Should I try +>instead of +<or what?open(FH,"+<./file.dat") || die("Can't open ./file.dat for reading/writ +ing: $!"); flock(FH,LOCK_EX); seek(FH,0,0); @dat = <FH>; foreach (@dat) {chomp} # this is where I process @dat, and when I feed text # manually into it, it works. the problem doesn't # lie in this segment of the code seek(FH,0,0); print FH join("\n",@dat); flock(FH,LOCK_UN); close(FH);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: FreeBSD reading/writing workaround?
by hdp (Beadle) on Apr 26, 2001 at 08:39 UTC |