- or download this
my ($fin, $dt, $vard ); - or download this
my %anc = ();
- or download this
my %cnt = ();
- or download this
my @myfiles =();
- or download this
my @all = ();
- or download this
- or download this
@myfiles=<A*> or die "No files to open A\* for reading. $!";
- or download this
- or download this
foreach $fin (@myfiles) {
- or download this
- or download this
##my $fin="A20100222.1700-1715_GWLD1E_1.xml";
- or download this
open INP, "$fin" or die "Cannot open $fin for read :$!";
- or download this
$fin =~ (/^A(\d{8}).(\d{4})/);
- or download this
my $dt = "$1" . ":" . "$2";
- or download this
#print "$dt\n";
- or download this
while (<INP>) {
- or download this
if (/^<moid>.*=(\d+)</) {
- or download this
$anc{$1} += 1;
- or download this
}
- or download this
elsif (/^<mt>(.+)</) {
- or download this
$cnt{$1} += 1;
- or download this
}
- or download this
elsif (/^<\/md>$/) {
- or download this
last;
- or download this
}
- or download this
}
- or download this
close (INP);
- or download this
}
- or download this
- or download this
open(OUT, ">>all_announc_cnt.txt") or die "Cannot open all_announc_cnt
+.txt file for writting :$!";
- or download this
- or download this
foreach $vard (sort {$a <=> $b} (keys(%anc))) {
- or download this
print OUT "$vard:$anc{$vard}\n";
- or download this
}
- or download this
print OUT "\n";
- or download this
foreach $vard (sort (keys(%cnt))) {
- or download this
print OUT "$vard:$cnt{$vard}\n";
- or download this
#push (@all, "$vard:$anc{$vard}");
- or download this
}
- or download this
- or download this
close (OUT);