#!/usr/bin/perl
$filename="/home.others/eccv/ECCV/Review/Reviewers/accepted_reviewers.txt";
$dummy[0]='drbohlav@cmp.felk.cvut.cz';
$dummy[1]='bakstein@cmp.felk.cvut.cz';
$dummy[2]='krsek@cmp.felk.cvut.cz';
   open( LIST, "<$filename" );
	    my $N_reviewer = 0;
            my $d=0;
	    while( <LIST> )
	    {
		chomp;
#		if( m/^\s*([^ ]+)\s*;\s*([^ ].*[^ ])\s*;\s*([^ ].*[^ ])\s*;\s*([^ ].*[^ ])\s*;\s*([^ ]+)\s*$/i )
		if (m/^\s*([^ ].*[^ ])\s*,\s*([^ ].*[^ ])\s*<([^ ]+)>\s*\(\s*([^ ]+)\s*\)\s*$/i )
		{
		    #my( $R_login, $R_name, $R_affiliation, $R_country, $R_email ) =( $1, $2, $3, $4, $5 );
		    my ($l,$n)= split("\@",$3); my $R_country="USA";my $R_affiliation=""; 
		    my $R_name = "$1 $2"; my $R_login = $3; my $R_email= $3;
		    if ($n=~/^([^ ]+)\.(\w+)$/i ) { if (($2 ne 'edu') && ( $2 ne 'com') && ( $2 ne 'org') ) {$R_country=uc($2);}	
						    $R_affiliation=$1;}
		    $R_email=$dummy[$d]; $d++; if ($d>2) {$d=0;}
		     print ("$N_reviewer : Name=$R_name , Login=$R_login , Country=$R_country , Affiliation=$R_affiliation , Email=$R_email \n");
		    $N_reviewer++;
		}
	    }
	    close( LIST );

	    print ( "$N_reviewer reviewers have been registered from the file $filename\n");
