August 1999 Perl Hardware Store Slide #21

         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;
         }


Next Copyright © 1998 M-J. Dominus