12345678910111213141516171819202122232425262728 |
- use strict;
- my %hash;
- while (<>) {
- chomp;
- s
- my $path = '/';
- while (m
- $path .= $1;
- print "+ $path\n" unless $hash{$path}++;
- }
- if (m
- print "+ $path$1\n";
- } else {
- delete $hash{$path};
- }
- }
- foreach (sort keys %hash) {
- print "- $_*\n";
- }
- print "- /*\n";
|