Fix Perl warning
authorPeter Eisentraut <[email protected]>
Sat, 8 Jul 2023 15:24:41 +0000 (17:24 +0200)
committerPeter Eisentraut <[email protected]>
Sat, 8 Jul 2023 15:27:18 +0000 (17:27 +0200)
Use of uninitialized value $content in concatenation (.) or string

src/test/perl/PostgreSQL/Test/Utils.pm

index 220cab303c7321ac7009c2612ae9730c1af328cb..617caa022f494f6b7ee08963af65a0a8fa2c2a85 100644 (file)
@@ -564,7 +564,7 @@ sub string_replace_file
 {
    my ($filename, $find, $replace) = @_;
    open(my $in, '<', $filename);
-   my $content;
+   my $content = '';
    while (<$in>)
    {
        $_ =~ s/$find/$replace/;