in reply to Re^3: sorting hash by value when value is an array ref
in thread sorting hash by value when value is an array ref
The Template then uses the array named homeworks which is identical to @sorted in the perl script. The [% FOREACH key IN homeworks %] just iterates through the array and prints inserts each element into the hash to get the value.my $vars = { homework => \%homeworkHash, homeworks => \@sorted, }; my $tt = Template->new({ INCLUDE_PATH => "/inetpub/wwwroot/lib", WRAPPER => 'wrapperInstructor.htm', }); $tt->process('ClassGrades.htm', $vars)||die $tt->error();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: sorting hash by value when value is an array ref
by beachguy82 (Novice) on Nov 16, 2004 at 03:23 UTC | |
by beachguy82 (Novice) on Nov 16, 2004 at 04:24 UTC | |
by Anonymous Monk on Nov 23, 2004 at 22:10 UTC |