split.pl 325 B

123456789101112131415
  1. #!/usr/bin/perl
  2. # ./split.pl log.hashes
  3. undef $/;
  4. $_ = <>;
  5. for $match (split(/-------------------------------------------------------------------------------/)) {
  6. $match =~ m/^--- Testing (\w+)/m;
  7. unless ($seen{$1}) {
  8. open(O, ">doc/$1") and print "doc/$1\n";
  9. $seen{$1}++;
  10. print O $match;
  11. close(O);
  12. }
  13. }