Hey Allan, yeah that will work! Keep going! If you need help, ask a specific question. For example, "how can I find out what the first letter of a string is?" It seems to me you've got the logic worked out. The more you teach me, the more I learn. The more I learn, the more I teach.

but would that work considering the main goal is to make categories (unless we knew that there were the same amount of each letter in which case we could store 1-10 in the sorted array under a)? My initial thought would be that it would be best to do a regex to get the first letter and then put that in an array with all the others with that letter. The more you teach me, the more I learn. The more I learn, the more I teach.

Sorting is ultimately what he wants, as that is even what the example website does.

The fact that they are displayed grouped by first letter is a totally different issue. Once the elements are sorted, grouping by first letter becomes trivial. Not that it's hard to begin with. Even without sorting, it would simply be a matter of using substr, and inputting the data into a hash where the keys were the first letter. QED.

ah I didn't even realize that they were sorted within the letter. Yeah I guess it would be best to sort them all at once at the beginning. QED :) The more you teach me, the more I learn. The more I learn, the more I teach.

Sorting is ultimately what he wants- No, I've got the sorting done, as that is even what the example website does.

The fact that they are displayed grouped by first letter is a totally different issue. Once the elements are sorted, grouping by first letter becomes trivial. Not that it's hard to begin with. Even without sorting, it would simply be a matter of using substr, and inputting the data into a hash where the keys were the first letter. QED.

Your code works, which is good, but it is poorly coded. It could be simplified and made more efficient. But why does the data file have a "|" on the end of each line? Can that be removed? -------------------------------------------------

I haven't. My son was in an accident and is in the hospital. When things settle down over the next few days if there is no reply I will take a look again. -------------------------------------------------

The script works great!, with one exception. The " | " needs to be stripped off the results at the end of each record.

The pipe is inserted when the entry is made into the database, it is used throughout the database manager

for sorting records, adding deleting etc.

That's why I had the push to a new array at the start of my code, I could try and incorporate what I had with your code, but I have a sneaky suspicion that I could mess it up. Is it possible for you to look at this?