use Digest::MD5;

my $file = shift;

die "Give file to checksum as argument\n" unless $file;
die "File not found: '$file'\n" unless -f $file;

open(FILE, $file) or die "Can't open '$file': $!";
binmode(FILE);
print Digest::MD5->new->addfile(*FILE)->hexdigest, " $file\n";
