Help for this page

Select Code to Download


  1. or download this
    sub safe_open {
        my $fn = shift;
        my $fh = do { local *FH };
    ...
        truncate($fh, 0) or fatal_error("Could not truncate file $fn.") if
    + $do_trun;
        return $fh;
    }