6 for my $text (<*.txt>) {
7 open I, '<', $text || die "cannot read: $text";
13 $include{$text}{$_} = 1;
20 # Do we care about chained includes???
24 while (my ($text, $included) = each %include) {
25 print STDERR "Looking at $text...\n";
26 for my $i (keys %$included) {
27 print STDERR "$text includes $i.\n";
28 # $text has include::$i; if $i includes $j
29 # $text indirectly includes $j.
30 if (exists $include{$i}) {
31 print STDERR "$i includes something.\n";
32 for my $j (keys %{$include{$i}}) {
33 print STDERR "$text includes $i include $j\n";
34 if (!exists $include{$text}{$j}) {
35 $include{$text}{$j} = 1;
45 while (my ($text, $included) = each %include) {
46 if (! exists $included{$text} &&
47 (my $base = $text) =~ s/\.txt$//) {
50 $suffix = '7'; # yuck...
52 print "$base.html $base.$suffix : ", join(" ", keys %$included), "\n";