Help for this page

Select Code to Download


  1. or download this
      open(FILE, ">>$path") or die "$! writing $path";
      &lock;  # calls flock(FLOCK_EX) and logs
      print FILE $string;
      &unlock; # calls flock(FLOCK_UN) and logs
      close FILE;
    
  2. or download this
      open(FILE, ">>$path") or die "$! writing $path";
      &lock;
      seek(FILE, 0, 2);  # ensure positioned at EOF
      print FILE $string;
      ...