#!/usr/bin/perl -w use strict; die "need file as parameter" unless my $file = $ARGV[0]; open(my $fh, $file) or die "Can't open file $file: $!"; die "File $file is too small!" if -s $file < 65536; my $hashstring = -s $file; #calculate first 64kb for(1 .. 65536/8) { read($fh, my $byte, 4); my $ll = unpack("LL", $byte); #here is missing code } #calculate last 64kb seek $fh, -65536, 2; for(1 .. 65536/8) { read($fh, my $byte, 4); my $ll = unpack("LL", $byte); #here is missing code } close($fh); printf("Hash of $file is: %016x", $hashstring);