Perl has many built-in operators to make getting lists of names easy, and also for figuring out what you really have once you have a name. We need to step outside of the core perl, but not very far away. Each name found below . Once as a name within its parent directory, once as the name of . We can notice and skip over directories and symbolic links.
Files are where the real action is located.
But back to what Perl can help with, first. Just a list of text files. But this actually doesn't tell us too much. What we might really want is a list of all the Perl scripts. Well, the Unix command called file can peer inside the contents of a file to figure out what it is.