Help for this page

Select Code to Download


  1. or download this
    local *FH;
    open (FH, ">/tmp/myprocess.tmp") || die "Cannot open temporary file: $
    +!\n";
    ...
    ...
    
    close FH;
    
  2. or download this
    use IO::File;
    my $fh = IO::File->new("/tmp/myprocess.tmp", "w");
    ...
    
        $fh->close;
    }
    
  3. or download this
    use Fcntl;
    use POSIX;
    ...
    do {
        $name = tmpnam();
    } until sysopen(FH, $name, O_RDWR|O_CREAT|O_EXCL, 0666);
    
  4. or download this
    use IO::File;
    my $fh = IO::File->new_tmpfile;