Hi!
Using the following hash as an example:
$shash{"student1"} = join("\t", ("bob", "tyson", "room5"));
$shash{"student2"} = join("\t", ("ron", "anderson", "room4"));
$shash{"student3"} = join("\t", ("dave", "lee", "room2"));
$shash{"student4"} = join("\t", ("tim", "barker", "room3"));
$shash{"student5"} = join("\t", ("roger", "farley", "room1"));
How can I sort the hash by, for example, last name?
And can I sort the hash by last name and then first name?
I've learned to sort by the key or by the entire value, but sorting by a
single element escapes me.
Thanks for your help!