| open I, '<', $text || die "cannot read: $text"; |
| # Do we care about chained includes??? |
| while (my ($text, $included) = each %include) { |
| for my $i (keys %$included) { |
| # $text has include::$i; if $i includes $j |
| # $text indirectly includes $j. |
| if (exists $include{$i}) { |
| for my $j (keys %{$include{$i}}) { |
| if (!exists $include{$text}{$j}) { |
| while (my ($text, $included) = each %include) { |
| if (! exists $included{$text} && |
| (my $base = $text) =~ s/\.txt$//) { |
| print "$base.html $base.xml : ", join(" ", keys %$included), "\n"; |