in reply to Cleaning up unused subroutines

i suggest you devise a solution that suits your particular code....as in general there's no way of producing a call hierarchy for perl programs by script inspection alone, and even particular runs may not call certain functions depending on program input.
use strict and similar may help somewhat...but no guarantees.
as a (very) rough guide, count the occurences that grep found for the function name in the code
the hardest line to type correctly is: stty erase ^H