Why not use OOP? Create base class architecture (too bad there are no java-like interfaces in perl). Inheret what you need and implement the rest. No more need for all this string parsing.. just execute on your data.
All the function references will be taken care of.