Help for this page

Select Code to Download


  1. or download this
    || die "File not found";
    
  2. or download this
    || die "Unable to open input file: $!";
    # ... and ...
    || die "Unable to open output file: $!";
    
  3. or download this
    use strict;
    use warnings;
    ...
        };
    }   # $temp_out falls out of scope; temp file should be removed even i
    +f the move call failed.
        # flock falls out of scope; lock is released on $target_file.
    
  4. or download this
    use strict;
    use warnings;
    ...
            $line =~ s/foo/bar/;
        }
    }   # $tied falls out of scope. File is closed, lock expires.