I figured out my errors with the file list. One of the problems is that there is
an invisible MPW icon the the directory. What is that? The file name is Icon.
Another problem is that I needed to chomp the fileName before using it. Why
would I have to do that?
Thanks,
Kathy
Here is the code I am using now. If I use the -f option, it will still process
the Icon file.
my @dirFiles = readdir(PARSE);
closedir(PARSE);
foreach my $fileName(@dirFiles) {
chomp($fileName);
print "This file is named " . $fileName;
print "\n";
if ( ($fileName ne "Icon") && ($fileName ne ".")) {
print("Processing " . $fileName);
print "\n";
processFile($fileName);
}
}
- Re: [MacPerl] parsing files in a directory Katherine Richmond
- Re: [MacPerl] parsing files in a directory Randy Boring
- Re: [MacPerl] parsing files in a directory Thomas Wegner
- Re: [MacPerl] parsing files in a directory Bill Becker
- Re: [MacPerl] parsing files in a directory Katherine Richmond
- Re: [MacPerl] parsing files in a directory Bart Lateur
- Re: [MacPerl] parsing files in a directory John W Baxter
- Re: [MacPerl] parsing files in a directory Katherine Richmond
- Re: [MacPerl] parsing files in a directory Bart Lateur
- Re: [MacPerl] parsing files in a directory Katherine Richmond
