]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
Switch to 3-arg open calls
authormartin f. krafft <redacted>
Wed, 15 Feb 2017 21:20:06 +0000 (22:20 +0100)
committermartin f. krafft <redacted>
Wed, 15 Feb 2017 21:34:44 +0000 (22:34 +0100)
Signed-off-by: martin f. krafft <redacted>
scripts/ctrlact.pl

index c35a2c4467778c33b46dcb40f55c651150605aa6..534b00a74542d82830ce9ad153147b52568ecf20 100644 (file)
@@ -361,10 +361,10 @@ sub get_mappings_fh {
        my ($filename) = @_;
        my $fh;
        if (-e $filename) {
-               open($fh, $filename) || croak "Cannot open mappings file: $!";
+               open($fh, '<', $filename) || croak "Cannot open mappings file: $!";
        }
        else {
-               open($fh, "+>$filename") || croak "Cannot create mappings file: $!";
+               open($fh, '+>', $filename) || croak "Cannot create mappings file: $!";
 
                my $ftw = from_data_level($fallback_window_threshold);
                my $ftc = from_data_level($fallback_channel_threshold);
git clone https://git.99rst.org/PROJECT