in reply to Cleaning up unused subroutines

Judicious use of grep is about as good as it gets. One to grab your subroutine names, another to find occurences of the "calls" to those subs (or lack of calls).

As the previous comment noted, you'll have to suit the solution to your particular code. And, removing calls to subroutines can sometimes create artifacts, especially if those subroutines returned values or took paramaters, so - be careful.

---
echo S 1 [ Y V U | perl -ane 'print reverse map { $_ = chr(ord($_)-1) } @F;'