in reply to How do I get two-way io access on a file?
You can open a file for r/w access by using
open FH, "+< $filename" or die "Can't open $filename for r/w: $!\n";
but working with that may drive you nuts (see perldoc -f open for why).
Consider having your updating script use a working copy, which gets copied over to the file the other processes access when the updating script's done with it (which is essentially what the perldoc recommends).
Depending on what you're storing in the file, consider using DB_File and its ilk (e.g. SDBM_File), which will let you treat the data like it's in a hash, easy updating.
|
|---|