Help for this page

Select Code to Download


  1. or download this
    #opens counter data file
    open(COUNTERDAT,"./counter.dat");
    
    #locks file, and if can't, goes back to READCOUNTER to try again
    flock COUNTERDAT, 1 or next READCOUNTER;
    
  2. or download this
    #opens counter data file again
    open(COUNTERDAT,">./counter.dat");
    
    #locks file, and if can't, goes back to WRITECOUNTER
    flock COUNTERDAT, 2 or next WRITECOUNTER;
    
  3. or download this
    open(COUNTERDAT,"./counter.dat");
    flock COUNTERDAT, 1 or next READCOUNTER;