On Wed, Apr 21, 2010 at 10:20:27 +0100, Dan Track <dan.track@xxxxxxxxx> wrote: > > Basically to improve my perl scripting, I've given myself a challenge > where I would like to order the users in the passwd file by uid, I > could do this in another language but I'm focused on improving my perl > scripting. The script I've written so far is below, I've managed to > figure out hashes and have read in the file and created a hash of > hashes. It's after this that I'm stuck, I'm struggling to order the > hash of hashes by uid and then print the ordered list out? Can someone > please help me to finish this off? I'm trying to avoid using perl > modules as I want to improve my scripting ability. It looks like you are doing string comparisons on the uid. I think you might want to try <=> instead of cmp. -- users mailing list users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines