# /usr/bin/perl # doc/src/sgml/mk_feature_tables.pl use strict; use warnings; my $yesno = $ARGV[0]; open my $pack, '<', $ARGV[1] or die; my %feature_packages; while (<$pack>) { chomp; my ($fid, $pname) = split /\t/; if ($feature_packages{$fid}) { $feature_packages{$fid} .= ", $pname"; } else { $feature_packages{$fid} = $pname; } } close $pack; open my $feat, '<', $ARGV[2] or die; print "
\n"; while (<$feat>) { chomp; my ($feature_id, $feature_name, $subfeature_id, $subfeature_name, $is_supported, $comments) = split /\t/; $is_supported eq $yesno || next; $feature_name =~ s/</g; $feature_name =~ s/>/>/g; $subfeature_name =~ s/</g; $subfeature_name =~ s/>/>/g; print "