Here's it

Code: Perl
#!/usr/bin/perl

my %seen;
my $line;
my @data;

open( A, "File1.txt" ) or die $!;
my $line = <A>;    # first line
while ( $line = <A> )
{
    chomp($line);
    @data = split( " ", $line );
    next unless(@data);
    ( $Field2, $Field3, $Field4 ) = ( $data[1], $data[2], $data[3] );
    $seen{"$Field2,$Field3,$Field4"} = 1;
}
close(A);

open( B, "File2.txt" ) or die $!;
my $line = <B>;    # first line
while ( $line = <B> )
{
    chomp($line);
    @data = split( " ", $line );
    next unless(@data);
    ( $Field2, $Field3, $Field4 ) = ( $data[0], $data[1], $data[2] );
    $seen{"$Field2,$Field3,$Field4"} += 2;
}
close(B);

while ( my ( $key, $val ) = each %seen )
{
    if ( $val == 1 )
    {
        # $key is in first file but not second
        print " File 1 - $key\n";
    }
    elsif ( $val == 2 )
    {
        # $key is in second file but not first
        print " File 2 - $key\n";
    }
    else
    {
        # key is in both files
        print " Both file - $key\n";
    }
}