open(FILE, "links.dat") || die "Can't open file!"; flock(FILE, 2) || die "Can't lock file!"; stopit if eof FILE; while ($line = ) { ....