3 # Computes and prints to stdout the CRC-32 values of the given files
6 use lib
qw( blib/lib lib );
10 my $totalFiles = scalar(@ARGV);
11 foreach my $file (@ARGV) {
13 warn "$0: ${file}: Is a directory\n";
16 my $fh = FileHandle
->new();
17 if ( !$fh->open( $file, 'r' ) ) {
25 while ( $bytesRead = $fh->read( $buffer, 32768 ) ) {
26 $crc = Archive
::Zip
::computeCRC32
( $buffer, $crc );
28 printf( "%08x", $crc );
29 print("\t$file") if ( $totalFiles > 1 );