in reply to Read Perl files inside a directory and its subfolders
Have a look at File::Find. Here is an example: Re: How do you use the if pragma?.