As far as honing your Tk skills, one thing I notice is that your window will change size with every addition or delete. This is very annoying to the eyes. I would suggest that instead of displaying the sorted names in a Label, make a Scrolled Listbox, with a -textvariable=> \@array. Then when you add/delete, do the addition/deletion to the @array, sort @array, then update the window. Since you are assigning a priority to each name, you can sort on the priority hash field.