in reply to Searching for duplication in legacy code

If you are on a Unix/Linux system just grep for the sub and/or sub name
grep -r "sub " * grep -r "sub <sub name>" *