You are most welcome, but I do advise that if you are going to maintain Perl code, it would be wise to examine the much more efficient mechanisms shown by other authors. Mine was designed to be readable; it is not exactly the most efficient way to do it in Perl. :-)