Hello,
Stuck here,
The first sort block works like a charm!
if ($sort_order == 1) {
# sort by name
# $key is really the filename with out the path and '.html'
foreach my $key (sort {lc($a) cmp lc($b)} keys %subjects){
my $name;
($name = $key ) =~ s/_(\d+)$//;
$name =~ tr/_/ /;
&print_table_rows($key,$name,$subjects{$key}," ");
}
}
However, this one has be stuck, I want to sort (case insensitive) the values
in the hash %subjects, and I need to get keys of the hash as well --
the key of the hash has data I need to pass along to my sub,
elsif ($sort_order == 2) {
# sort by subject
foreach my $subject (sort {lc($a) cmp lc($b)} values %subjects){
##
need the key here...
my $name;
($name = $key ) =~ s/_\d+$//;
$name =~ tr/_/ /;
##
&print_table_rows($key,$name,$subject," ");
}
--------------------------------------------
Looking for Web Talent, You found it!
portfolio: www.coraconnection.com/web/
email: [EMAIL PROTECTED]
tel/fax: (860) 231-9988
--------------------------------------------