#!/usr/bin/perl sub makelist{ open FAMS,"){chomp;s/\s*$//; ($fam,$name,$desc)=split /:/;$f_info{$fam}="$fam $name $desc"} while (){ chomp; next unless /^\d/; ($fnum,$lat,$com,$whr) = split /:/; $str="$lat $com
\n"; push @{$famlist{$fnum}},$str; $famcounts{$fnum}++; } for $fam (sort {$a <=> $b} keys %famlist) { print "
$f_info{$fam} ($famcounts{$fam})
\n"; map {print $_} @{$famlist{$fam} } } for (sort {$a <=> $b} keys %famlist) { $f_info{$_} =~ s///g;$f_info{$_} =~ s/<\/i>//g; print "$f_info{$_} ($famcounts{$_})
\n" } } makelist();