Help for this page

Select Code to Download


  1. or download this
    # from perlfaq5
    require ’sys/syscall.ph’;
    $rc = syscall(&SYS_close, $fd + 0);  # must force numeric
    die "can’t sysclose $fd: $!" unless $rc == -1;
    
  2. or download this
    #!/usr/bin/perl -w
    require 'sys/syscall.ph';
    ...
        warn "Can't sysclose $fd: $!" unless $rc == -1;
      }
    }