is quite good as checksum algorithms go (it uses a 32 bit CRC AFAIK which is good). md5sum
is better but you may not have it installed on the machine - if you do then use that for even more feelgood factor.
As for your code - you should check the size of the file too as well as the CRC. The CRC has roughly a 1 chance in 2^32 of failing to detect an error. If you constrain that further by checking the length of the file then you'll add several orders of magnitude to that number (depending on the lengths of your files of course).
# Same to here then
my @gg = split /\s+/, $g;
my @hh = split /\s+/, $h;
die "Files do not match"
if $gg != $hh || $gg != $hh;
If you could install a module on the far end then I'd install Digest::MD5
and use that. If you can't install any stuff then what you've got looks pretty good to me.