Drop everything. Run to the bookstore. Buy: Perl Medic It's a book about rescuing bad Perl code from itself. It has all kinds of good advice for you. Read it.
Seconded (I'd mentally begun a reply with "Run, don't walk, ..." just before i read this node :-)