The only difference among both the modules is the order in which the files and directories are parsed. Working of finddepth() function is almost similar to the find() function except for the fact that it invokes &wanted for directory’s content first than invokes it for the directory. In Perl, file existence is checked using file operators which are used for checking if the specified file is present or not in the particular directory or folder is known as checking of file existence using file existence operators such as X operators where particularly we use e operator for checking of file presence in the directory or folder in Perl programming language.
Finddepth: finddepth() performs a post-order traversal instead of performing pre-order, working from down to top.Find: find() function performs a depth-first search on the mentioned/defined It calls and invokes the "&wanted" function for each file or sub-directory found in that directory.Traversing files and directories in Perl can also be done through File::Find module which comes with the Perl language. Traversing can be performed through function calls opendir and readdir which are a part of Perl programming language. ISRO CS Syllabus for Scientist/Engineer Examįor traversing a directory tree in Perl, there are several ways/methods.ISRO CS Original Papers and Official Keys.GATE CS Original Papers and Official Keys like i had 10 file in one directory and i had text file which contains same files.The thingis i need to compare the files in the text file and in directory.If anything is missing i need to send mail.