$file .= '.com' if $^O eq 'VMS';
# Open input file before creating output file.
-$IN = File::Spec->catfile(File::Spec->updir, 'lib', 'diagnostics.pm');
-open IN or die "Can't open $IN: $!\n";
+$in = File::Spec->catfile(File::Spec->updir, 'lib', 'diagnostics.pm');
+open IN, '<', $in or die "Can't open $in: $!\n";
# Create output file.
-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";