in reply to $$, perhaps?
in thread Exclusively updating a file that continues to be repeatedly read
The return value would be a tied handle. Reading from the handle would read from the beginning of the original file (now flocked). Writing to the handle writes to the new location. Closing the handle or letting it go out of scope does the rename shuffle.use File::UpdateExclusively; { my $handle = File::UpdateExclusively->on("/some/file/name") or die; my @data = <$handle>; ## process @data print $handle @data; }
Now to code that... {grin}
-- Randal L. Schwartz, Perl hacker
|
|---|