Help for this page

Select Code to Download


  1. or download this
    open        # open a file for read or write
    (
    ...
    )
    or         # if the open works it returns true so we never do the next
    + bit
    diehtml()  # print an error message
    
  2. or download this
    $fh = "ORDERFILE";
    sysopen($fh, "$outfile", O_CREAT | O_EXCL | O_RDWR, 0600)
            or diehtml("Can't open order records: $!\n");
    
  3. or download this
    open $fh, ">$file" or die "Can't write $file $!\n";
    print $fh "here is some data\n";
    close $fh;