Moin!
gibt es noch einen anderen Befehl wie flock, der die Datei vor einem 2ten öffnen bzw. gleichzeitiges schreiben schützt ?
Vielleicht sogar zu einem sub weiter/umleitet.
Ich möchte flock nicht nehmen, da ich evtl. einen Windows-Server betreiben werde und die Scripte auch auf Windows teste.
http://www.apache-asp.org/install.html
WinME / 98 / 95 flock() workaround
For those on desktop Windows operation systems, Apache::ASP v2.25 and later needs a special work around for the lack of flock() support on these systems. Please add this to your Apache httpd.conf to fix this problem after mod_perl is installed:
<Perl>
*CORE::GLOBAL::flock = sub { 1 };
</Perl>
PerlModule Apache::ASP
Please be sure to add this configuration before Apache::ASP is loaded via PerlModule, or a PerlRequire statement.
Das überschreibt scheinbar die Funktion mit einer neuen Subroutine, die einfach garnichts macht, außer "true" zurückzugeben.
Ansonsten: http://www.google.com/search?q=perl+flock+windows&sourceid=opera&num=0&ie=utf-8&oe=utf-8
- Sven Rautenberg