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