in reply to Perl editor idea

Alternately, getting rid of the global variables and repetition and encapsulating similar things in modules and subroutines — which can be named — might solve your problem.