# v0.1
# script for the WASM.RU forum
my($in,$out);

$in = $ARGV[0];
$out = $ARGV[1];
#print("in is $in\n");
open(IN,"<$in") || die "in: $!\n";
open(OUT,">$out") || die "Out: $!\n";

#my($fl);
my $fl = 0;

while(<IN>){
	if($_ =~ /<!--Rating\@Mail.ru COUNTER-->/){
		$fl = 1;
		}
	if(!$fl){
		print OUT;
		}
	if($_ =~ /<!--\/COUNTER-->/){
		$fl = 0;
		}
	}

close(IN);
close(OUT);
