Find match in two diff file - local srv and remote server

Perl Guru....

I need to compare two diff file (file1.abc will locate in current server and file2.abc will locate in remote server), basically the script will look for match in both file and only will send out email if there is no match and also give me list of unmatch and dups as well.

So here is the logic how the script will work.

The script will reside in Server1.
Server 1 has 13 different files like:

file1.abc ..............>compare with remote server (server 2) file2.abc
file1.bcd..............>compare with remote server (server 3) file2.abc
file1.dfg ..............>compare with remote server (server 4) file2.abc
file1.ghi..............>compare with remote server (server 5) file2.abc
file1.ijk..............>compare with remote server (server 6) file2.abc
file1.klm..............>compare with remote server (server 7) file2.abc
file1.mno..............>compare with remote server (server 8) file2.abc
file1.opq..............>compare with remote server (server 9) file2.abc
file1.qrs..............>compare with remote server (server 10) file2.abc
file1.stu..............>compare with remote server (server 11) file2.abc
file1.uvw ..............>compare with remote server (server 12) file2.abc
file1.wxy..............>compare with remote server (server 13) file2.abc
file1.yza..............>compare with remote server (server 14) file2.abc

(The file names before extension are the same in Server1, but all filename are same in remote servers)

Now I need to compare file1.abc with remote server (Server 2) filename (file2.abc) (/xxx/xyx/mns/file2.abc). The script need to compare only with component name
In this example sunsoloaris, hpunix, linux.

All of the file has same format in both file types.
Format is like the following:

file1.abc format:

Fsdfsdf kkldfsd
Component sunsolaris
Sdfsdfs dfdsfds
Sdfsdf sdfsdf
Sdfsdf ertyertre
Sdfsdf hfdghdfgd

Fsdfsdf kkldfsd
Component hpunix
Sdfsdfs dfdsfds
Sdfsdf sdfsdf
Sdfsdf ertyertre
Sdfsdf hfdghdfgd

Fsdfsdf kkldfsd
Component linux
Sdfsdfs dfdsfds
Sdfsdf sdfsdf
Sdfsdf ertyertre
Sdfsdf hfdghdfgd

Following is file2.abc (Remote server - server 2)

Fsdfsdf kkldfsd
Component sunsolaris
Sdfsdfs dfdsfds
Sdfsdf sdfsdf
Sdfsdf ertyertre
Sdfsdf hfdghdfgd

Fsdfsdf kkldfsd
Component winxp
Sdfsdfs dfdsfds
Sdfsdf sdfsdf
Sdfsdf ertyertre
Sdfsdf hfdghdfgd

Fsdfsdf kkldfsd
Component hpunix
Sdfsdfs dfdsfds
Sdfsdf sdfsdf
Sdfsdf ertyertre
Sdfsdf hfdghdfgd

Fsdfsdf kkldfsd
Component winxp
Sdfsdfs dfdsfds
Sdfsdf sdfsdf
Sdfsdf ertyertre
Sdfsdf hfdghdfgd

Output will be in an email:
(If exact match of Component found don't send email.)
If exact match of Component not found send email. E-mail should indicate:
Component linux not found in file2.abc in remote server (server 2)
Multiple entries of Component winxp found in file2.abc in remote server (server 2)

To get date from remote server login and passwd will be required.

Thanks.