Help for this page

Select Code to Download


  1. or download this
    if (!-e "$log"){
        open(CREATE, "+>>$log") or die "$log failed: $!\n";
    ...
    
        close(CREATE);
    }
    
  2. or download this
    use Fcntl qw(O_CREAT O_EXCL O_APPEND O_RDWR);
    
    ...
    } else {
        warn("Unable to open log file '$log': $!.\n");
    }
    
  3. or download this
    ... open CREATE ...
    foreach my $ser (@ser) {
        printf CREATE "%3s", $ser;
    }