[Templates] Serious problem with sorting hash of hashes

SoCo soco@zoznam.sk
Mon, 4 Mar 2002 23:50:02 +0100


Hi,
I have topic problem, coz i'm getting this error:

undef error - Can't use string ("7") as a HASH ref while "strict refs" in
use at /usr/lib/perl5/site_perl/5.6.1/i386-linux/Template/Stash.pm line 161.

while using nsort on:
[% FOREACH sec_hash = pri_hash.keys.nsort('sec_hash_key') %]

where:
$pri_hash->{$sec_hash->{'sec_hash_key'}} = 'some_values';
so 'pri_hash' is hashref containing another 'sec_hash' hashref.

I have based that on sort from documentation, but there is just @ of %...
realy need know, if it is possible to sort % of % in tt2 ... hope, somebody
helps me :)

SoCo