Help for this page

Select Code to Download


  1. or download this
      my @fds = `ls /proc/$$/fd`;
      chomp @fds;
    
  2. or download this
        require 'syscall.ph';  # May have to run h2ph first.
        for my $fd (@fds) {
            syscall(&SYS_close, $fd) == -1 or die $!;
        }