R
Richard Nixon
Hello newsgroup,
Fortran is my syntax of choice for my avocation in numerical analysis, but
perl is the much better tool for the net. For one of the better fortran
sites, they have this counter:
http://www.fortranlib.com/flcounter.perl
If the open statement in this:
sub check_lock {
$time = $_[0];
for ($i = 1;$i <= $time; $i++) {
if (-e "$data_dir$lock_file") {
sleep 1;
}
else {
open(LOCK,">$data_dir$lock_file");
print LOCK "0";
close(LOCK);
last;
}
}
}
is changed to this:
sysopen(FH, $path, O_WRONLY|O_EXCL|O_CREAT) or die $!;
do they have a better program?
Thanks and cheers,
Fortran is my syntax of choice for my avocation in numerical analysis, but
perl is the much better tool for the net. For one of the better fortran
sites, they have this counter:
http://www.fortranlib.com/flcounter.perl
If the open statement in this:
sub check_lock {
$time = $_[0];
for ($i = 1;$i <= $time; $i++) {
if (-e "$data_dir$lock_file") {
sleep 1;
}
else {
open(LOCK,">$data_dir$lock_file");
print LOCK "0";
close(LOCK);
last;
}
}
}
is changed to this:
sysopen(FH, $path, O_WRONLY|O_EXCL|O_CREAT) or die $!;
do they have a better program?
Thanks and cheers,