version 1.1, 2001/12/31 18:05:16
|
version 1.3, 2001/12/31 18:22:32
|
Line 2
|
Line 2
|
$wait=3; |
$wait=3; |
$cfile = 'counts/count7.txt'; |
$cfile = 'counts/count7.txt'; |
open STDERR, ">errors"; |
open STDERR, ">errors"; |
$lockdir="c:/html/countdir/"; |
$lockdir="counts/"; |
$l = lc $ENV{'DOCUMENT_NAME'}; |
$l = lc $ENV{'DOCUMENT_NAME'}; |
$header="Content-Type: text/html\n\n"; |
$header="Content-Type: text/html\n\n"; |
&lockfile && (print $header.'?? раз', exit); |
print $header; |
|
&lockfile && (print '?? раз', exit); |
|
|
open(F, $cfile); |
open(F, $cfile); |
@DATA = <F>; |
@DATA = <F>; |
Line 22 foreach (@DATA) {
|
Line 23 foreach (@DATA) {
|
print F @DATA; |
print F @DATA; |
close(F); |
close(F); |
rename("$tmp", $cfile); |
rename("$tmp", $cfile); |
print $header.$c. " раз".&Suffix($c); |
print "$c раз".&Suffix($c); |
&unlockfile ; |
&unlockfile ; |
exit |
exit |
} |
} |
Line 32 open(F, ">>$cfile");
|
Line 33 open(F, ">>$cfile");
|
print F "1 - $l\n"; |
print F "1 - $l\n"; |
close(F); |
close(F); |
|
|
print $header."первый раз"; |
print "первый раз"; |
&unlockfile; |
&unlockfile; |
|
|
sub lockfile |
sub lockfile |