Help for this page

Select Code to Download


  1. or download this
    my ($fin, $dt, $vard );
  2. or download this
    my %anc = ();
    
  3. or download this
    my %cnt = ();
    
  4. or download this
    my @myfiles =();
    
  5. or download this
    my @all = ();
    
  6. or download this
  7. or download this
    @myfiles=<A*> or die "No files to open A\* for reading. $!";
    
  8. or download this
  9. or download this
    foreach $fin (@myfiles) {
    
  10. or download this
  11. or download this
    ##my $fin="A20100222.1700-1715_GWLD1E_1.xml";
    
  12. or download this
    open INP, "$fin" or die "Cannot open $fin for read :$!";
    
  13. or download this
    $fin =~ (/^A(\d{8}).(\d{4})/);
    
  14. or download this
    my $dt = "$1" . ":" . "$2";
    
  15. or download this
    #print "$dt\n";
    
  16. or download this
    while (<INP>)  {
    
  17. or download this
        if (/^<moid>.*=(\d+)</) {
    
  18. or download this
        $anc{$1} += 1;
    
  19. or download this
        }
    
  20. or download this
        elsif (/^<mt>(.+)</) {
    
  21. or download this
        $cnt{$1} += 1;
    
  22. or download this
        }
    
  23. or download this
        elsif (/^<\/md>$/) {
    
  24. or download this
        last;
    
  25. or download this
        }
    
  26. or download this
    }
    
  27. or download this
    close (INP);
    
  28. or download this
    }
    
  29. or download this
  30. or download this
    open(OUT, ">>all_announc_cnt.txt") or die "Cannot open all_announc_cnt
    +.txt file for writting :$!";
    
  31. or download this
  32. or download this
    foreach $vard (sort {$a <=> $b} (keys(%anc))) {
    
  33. or download this
    print  OUT "$vard:$anc{$vard}\n";
    
  34. or download this
    }
    
  35. or download this
    print OUT "\n";
    
  36. or download this
    foreach $vard (sort (keys(%cnt))) {
    
  37. or download this
    print OUT "$vard:$cnt{$vard}\n";
    
  38. or download this
    #push (@all, "$vard:$anc{$vard}");
    
  39. or download this
    }
    
  40. or download this
  41. or download this
    close (OUT);