Recursively scan Perl code for dependencies