Unfortunately, I have to agree with
BrowserUk's
earlier remarks about this recent rash of postings that keep pecking away at this problem, one minor thing at a time (
count sort & output II,
count sort & output,
Pulling by regex II,
pulling by regex). Asking for help is one thing, and is certainly encouraged, but there is an expectation that one would at least
try to help themselves as well.
If you are having this much trouble with Perl, you should either hire a programmer or find some training materials. Posting every minor improvement to your script is not very productive.