Finding Subroutines

I'm maintaining a variety of programs (mostly in Perl) I didn't build, and the perllib is huge on the server. When I run across a user-defined subroutine it takes me at least an hour to look through all the logical places, and sometimes I still can't find the definition.

Is there an easy way to search all the files for a subroutine definition? My file search doesn't seem to do it. Thanks!

You may want to search for lines that begin 0 or more whitespace followed by "sub".

tyler_durden

Look at the cscope utility. It is not just limited to C or C++ codebases but with work with Perl, Python and more.