Hi,
I have to read files from the parent directory and delete those files. This parent directory contains logs files. This directory also contains some sub directories and I do not want to delete files from these sub directories. I am using this code
opendir(DIR, $lpath);
@flist = readdir(DIR);
closedir(DIR);
when I do this @flist also contains files from sub directories and I do want that.
How can I avoid reading files from the sub directories. Any help is appriciated.
-Supra91