The module File::Find would do the recursion for you.
In reply to Re: Recursion not working by BillKSmith in thread Recursion not working by siggib