1. You should put the "<% END %>" after the "</tr>" or otherwise the HTML won't
be well-formed (even though it may still display correctly).

Thank you for pointing that out. I will correct.
 

2. Please consider passing the Pats hash to the view/template as an already
sorted array-reference (or as a different parameter to it that way) because
there's a limit to how much complexity you should put in the template (even
assuming it may be possible).


So I am learning.