Problems you didn't get around to noticing yet:
-
@files=split / /,$file;
makes no sense. Why would you divide the file name into bits, and treat the bits as file names. You want
push @files, $file;
-
copy copies a file, it doesn't open it for reading. If you wish to copy the file, use copy. If you wish to read from the file, use open. If you wish to do both, use both. copy does not take three arguments.
-
while ($line = <INPUT>) if used to iterate through the lines of a file.
use strict;
use warnings;
my $dir_qfn = "C:\\inetpub\\performancetesting\\output\\new\\mlx\\aar"
+;
opendir(my $dh, $dir_qfn)
or die("Can't read dir $dir_qfn: $!\n");
while (defined(my $fn = readdir($dh)) ) {
my $qfn = "$dir_qfn/$fn";
next if !-f $qfn;
open(my $fh, '<', $qfn)
or do { warn("Can't open file $qfn: $!\n");
next;
};
while (<$fh>) {
chomp;
printf("%03d: %s\n", $., $_);
}
}