More Control Structures and Sorting  
 
 

Week 5

Readings:

  • Read Chapter 10 - More Control Structures
  • Read Chapter 14 - Customized Sorting

Key Concepts:

  • Additional control structures
  • Expression modifiers
  • Loop controls
  • Logical operators
  • String manipulation
  • Defining your own sort

Exercises:

    From the book:
  • Chapter 10: (2 and 3 should be done with the ternary operator)
  • Chapter 14
Write a subroutine for sort that will sort the hash from last week by value in ascending order (if tied then sort by key alphabetically) and print it out similarly. The sort subroutine may also be placed inline.


Files to Be Downloaded