#!/usr/bin/perl -w
use strict;

my %h;
while (<>) {
	chomp;
	next if /^\[/;
	my ($pkg, $file) = /^(.*?) \((.*?)[ \)]/;
	unless (defined $h{$file}) {
		$h{$file} = [];
	}
	push @{$h{$file}}, $pkg;
}

print "<html><body><table>\n";
foreach (sort keys %h) {
	printf '<tr><td>%s</td></tr>%s', $_, "\n";
	foreach (@{$h{$_}}) {
		printf '<tr><td></td><td>%s</td></tr>%s', $_, "\n";
	}
}
print "</table></body></html>\n";
# use Data::Dumper;
# print Data::Dumper->Dump([\%h]);
