Hi alan12,
You also might want to consider using opendir, readdir and related functions. You can look them up in the perlfunc documentation.
You might also look at the 'File' modules for such things as 'File::Find'. If you search, you should find at least one useful thread on this subject.
Good luck,
Grant.