> I am trying to sort a hash using the sort method and getting > inconsistent results.
What aren't you getting that you expect? Based on the template names it looks to me that you have building numbers as hash keys. Do you want it sorted on a building name that isn't the number? You might want to sort using .nsort if you really do want them sorted numerically. Again, the same with rooms, you say room names but the only thing I see are room numbers and room titles. If you want the room numbers to sort right you should probably use .nsort again. If that doesn't help, can you show us just a little data? 2 buildings with 2 or 3 rooms each, with the output you got and the output you want? > The syntax I have is: > > [% FOREACH bldgno = t_data.sort %] > [% FOREACH roomno = t_data.$bldgno.sort %] > <B>[% bldgno %] [% roomno %]</B> > [% t_data.$bldgno.$roomno.title %] ([% > t_data.$bldgno.$roomno.csm %]) > [% END %] > [% END %] > > t_data is a hash that has bldgs as keys, and a hash of rooms > as the value. > The has of rooms contains keys of title and CSM. > > I want the hash when it prints to sort by building names and > room names.
