...somebody..please..
the problem is..the loop keep on going non stop.i'm not sure if there's problem with my foreach loop or..did i misuse the CHDIR function?
Code:
@filelocation = Location::destination ($database);
$location = $filelocation[0];
chdir $location;
opendir (DIR, "$location")|| die "Couldn't open directory \n";
@fileList = readdir(DIR);
foreach my $file (@fileList) {
#...do something with the files..
}
the problem is..the loop keep on going non stop.i'm not sure if there's problem with my foreach loop or..did i misuse the CHDIR function?