I take it you didn't read this part:
"As an update note: If for some reason this doesn't do exactly what you want, I expect you to spend some time studying the code and for you to make a serious attempt at modifications. I think you are doomed if you just copy code without understanding how it works."
This isn't a code writing service, the idea is that you learn from the help you've been given. You've been drip feeding different requirements since your initial post. Read and understand How do I post a question effectively?
& tutorials->PerlMonks for the Absolute Beginner.