A
Andrew
I'm trying to learn how to use the opendir() function with perl, and each
time I try to run my perl script I keep getting "Permission denied".
Here is the script:
open (DIR, "c:\\Temp\\Directory1") or die "Can't open the directory. $! \n";
while (defined ($filename = readdir(DIR)) ) {
open (INPUT, "<c:\\Temp\\directory1\\".$filename) or die "Can't open the
file $filename\n";
until (eof(INPUT)) {
chomp($line = <INPUT>);
print "$line\n";
}
}
closedir(DIR);
and the results that I am getting is:
Can't open the directory. Permission denied.
The OS that I am using is WinXP Pro and I'm logged on as the Administrator.
Any thoughts?
Andrew.
time I try to run my perl script I keep getting "Permission denied".
Here is the script:
open (DIR, "c:\\Temp\\Directory1") or die "Can't open the directory. $! \n";
while (defined ($filename = readdir(DIR)) ) {
open (INPUT, "<c:\\Temp\\directory1\\".$filename) or die "Can't open the
file $filename\n";
until (eof(INPUT)) {
chomp($line = <INPUT>);
print "$line\n";
}
}
closedir(DIR);
and the results that I am getting is:
Can't open the directory. Permission denied.
The OS that I am using is WinXP Pro and I'm logged on as the Administrator.
Any thoughts?
Andrew.