How about the smartmatch operator?
while (<$fh>) {
my ($occurname, $tempname, @data1) = split;
my $data = $ref_data{$occurname};
print "$occurname $tempname has mismatch property\n" unless @$data ~~ @data1;
}
If your Perl is not new enough (< 5.10.1), just use TLP's idea.
EDIT: Added check for matching array lengths to stifle uninitialized value warnings when arrays are not the same size.
if (@data1 != @$data || grep { $data1[$_] != $data->[$_] } 0 .. $#data1) {
print "$occurname $tempname has mismatch property\n";
}
See grep