I've told you how it can be done, esper and Limbic~Region have suggested alternative approaches. Why don't you try composing your own, working solution from that (read some of the documentation I've pointed out and maybe some more basic Perl documentation perldoc perltoc is a good place to start) and this problem should be easy to solve. If something isn't working or you don't understand what certain parts of the code do then ask specific questions about that (preferably posting what you've tried) and I'm sure you will get help. PM is a place where we try to aid each other's understanding of Perl, not have someone do the work for you. If you want that, hire a Perl programmer.
| [reply] [d/l] |