CRC32 Perl Script

#!/usr/bin/perl
####################################################################
#
# crc32 (filename)
#
# 파일의 CRC32 체크섬을 출력한다.
#
# 실행을 위해서는 아래 패키지가 미리 설치되어 있어야 한다.
# yum -y install perl-Digest-CRC
# apt-get install -y libdigest-crc-perl
#
####################################################################
use strict;
use warnings;
use Digest::CRC;

my $ctx = Digest::CRC->new( type => 'crc32' );

open my $fh, '<:raw', $ARGV[0] or die $!;
$ctx->addfile(*$fh);
close $fh;

print $ctx->hexdigest, "\n";
위로 스크롤