This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Switch most open() calls to three-argument form.
[perl5.git] / utils / piconv.PL
index ca8a8cf..4e012d3 100644 (file)
@@ -18,7 +18,7 @@ chdir dirname($0);
 my $file = basename($0, '.PL');
 $file .= '.com' if $^O eq 'VMS';
 
-open OUT,">$file" or die "Can't create $file: $!";
+open OUT, ">", $file or die "Can't create $file: $!";
 
 print "Extracting $file (with variable substitutions)\n";
 
@@ -35,7 +35,7 @@ use File::Spec;
 
 my $piconv = File::Spec->catfile(File::Spec->catdir(File::Spec->updir, "cpan", "Encode", "bin"), "piconv");
 
-if (open(PICONV, $piconv)) {
+if (open(PICONV, '<', $piconv)) {
     print OUT <PICONV>;
     close PICONV;
 } else {