Help for this page

Select Code to Download


  1. or download this
    my $got_lock;
    use Fcntl;   # to get constants for O_CREAT | O_EXCL | O_RDWR
    ...
        sleep 2;
    }
    diehtml("Lock error $!\n") unless $got_lock;
    
  2. or download this
    open(ORDERFILE, ">$outfile")
            or diehtml("Can't open order records: $!\n");
    
  3. or download this
    sysopen($fh, "$dir/$name", O_CREAT | O_EXCL | O_RDWR, 0600);
    
  4. or download this
    $fh = "ORDERFILE";
    sysopen($fh, "$outfile", O_CREAT | O_EXCL | O_RDWR, 0600)
            or diehtml("Can't open order records: $!\n");