I never get answers to questions in newsgroups. There are a lot of reasons, many of which get repeated over and over again, many of which don't. Questions include the code, and it's 200 lines long, and comp.lang.perl is not a debugging service.
Nobody knows the answer to the question.
The question is so badly punctuated that nobody can bear to read it. Questions are written by a non-native speaker of English and the native speakers who are trying to understand it can't. I often wish that these people would post in their native languages. I'd love to see more discussion in languages other than English. Some Dutch guy tried posting all his comp.lang.c articles in Dutch a few years ago, and all the Americans flamed him.