This code looks ok to me, but I keep getting a "Sorry can't open c:\Logs directory: Permission denied when trying to read this file. I made sure the correct permissions were set. Can anyone please help.
#!perl -w
use strict;
my $srcdir="c:\\Logs";
my @files=();
open(DIR, $srcdir) or
die "Sorry can't open $srcdir directory: $!\n";
@files=readdir(DIR) or
die "Unable to read directory $srcdir: $!\n";
closedir(DIR);
print "@files!\n";
-Justin
#!perl -w
use strict;
my $srcdir="c:\\Logs";
my @files=();
open(DIR, $srcdir) or
die "Sorry can't open $srcdir directory: $!\n";
@files=readdir(DIR) or
die "Unable to read directory $srcdir: $!\n";
closedir(DIR);
print "@files!\n";
-Justin