Immediate reactions (which probably echo that of others):
- Nearly any time you have many variables that are similarly named, you should put those into a structure. In this case, an array would work nicely.
- Nearly any time you have code that repeats, you should factor it out to be a subroutine. Although, in this case making the data an array would probably have sufficed to reduce the code to one copy.
- Remove fatalsToBrowser in production code. It reveals far too much to precisely the person who can do the least about it. I have an example of "fatals to email" in one of my columns.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.