Bug 21395: Make perlcritic happy
[koha.git] / tools / upload-cover-image.pl
index ff89afb..1d2922c 100755 (executable)
@@ -132,8 +132,8 @@ if ($fileID) {
                 else {
                     next;
                 }
-                if ( open( FILE, $file ) ) {
-                    while ( my $line = <FILE> ) {
+                if ( open( my $fh, '<', $file ) ) {
+                    while ( my $line = <$fh> ) {
                         my $delim =
                             ( $line =~ /\t/ ) ? "\t"
                           : ( $line =~ /,/ )  ? ","
@@ -171,7 +171,7 @@ if ($fileID) {
                             undef $srcimage;
                         }
                     }
-                    close(FILE);
+                    close($fh);
                 }
                 else {
                     $error = 'OPNLINK';