You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to operator precedence, Perl treats:
| open FH, "> $file" || die 'Error';
as:
| open FH, ("> $file" || die 'Error');
which will always evaluate as:
| open FH, "> $file";
This change fixes those occurences, additionally using three-argument
open().
Copy file name to clipboardExpand all lines: foomatic-preferred-driver.in
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ for $printer (@{$db->{'overview'}}) {
59
59
print ": @sorted --> $sorted[0]\n";
60
60
$printer->{'driver'} = $sorted[0];
61
61
}
62
-
open PRINTERENTRY, "< $libdir/db/source/printer/$printer->{'id'}.xml" || die " Database entry for the printer $printer->{'make'} $printer->{'model'} ($printer->{'id'}) cannot be read!\n";
62
+
open (PRINTERENTRY, '<', "$libdir/db/source/printer/$printer->{'id'}.xml") or die " Database entry for the printer $printer->{'make'} $printer->{'model'} ($printer->{'id'}) cannot be read!\n";
63
63
my @printerentryfield = <PRINTERENTRY>;
64
64
close PRINTERENTRY;
65
65
@@ -80,7 +80,7 @@ for $printer (@{$db->{'overview'}}) {
open PRINTERENTRY, "> $libdir/db/source/printer/$printer->{'id'}.xml" || die " Database entry for the printer $printer->{'make'} $printer->{'model'} ($printer->{'id'}) cannot be written!\n";
83
+
open (PRINTERENTRY, '>', "$libdir/db/source/printer/$printer->{'id'}.xml") or die " Database entry for the printer $printer->{'make'} $printer->{'model'} ($printer->{'id'}) cannot be written!\n";
0 commit comments