How can I find the newest .pl file in a directory and all its subdirectories using Perl?
How can I scan an entire directory's contents, including its subdirectories' contents, and find the newest .pl file within them using Perl? I want to build a sorted array/list of the full file paths of all .pl files within a directory tree. So, for example, if my base directory is /home/users/cheeseconqueso/ I want to search for .pl files in that directory and any subdirectory within that path and then sort the .pl files by date. The end result would be an array, @pl_paths , where $pl_paths[0] would be something like /home/users/cheeseconqueso/maybe_not_newest_directory/surely_newest_file.pl