Compact way of getting file checksum in Perl

前端 未结 3 489
清酒与你
清酒与你 2021-01-12 14:47

I am looking for ways to get file checksums in Perl but not by executing the system command cksum -- would like to do it in Perl itself because the script needs

3条回答
  •  再見小時候
    2021-01-12 15:16

    This also works:

    use Digest::MD5 qw(md5_base64);
    ...
                open(HANDLE, "<", $dirItemPath);
                my $cksum = md5_base64();
                print "\nFile checksum = ".$cksum; 
    

提交回复
热议问题