Next The Perl Hardware Store DC.pm Version 24

Semaphore Files

      if (something()) {
        open F, $FILE or die ...;
        flock F, LOCK_SH;
        print while <F>;
      } else {
        open F, "> $FILE" or die ...;
        flock F, LOCK_EX;
        my $data = qx{some command};
        print F $data;
      }


continued...


Next Copyright © 2003 M. J. Dominus