Mercurial > ec-dotfiles
diff bin/testcrc @ 129:f18a27a0e8fc
Merge branch.
author | Edho Arief <edho@myconan.net> |
---|---|
date | Sat, 29 Oct 2011 11:40:35 +0700 |
parents | 5bafb912837e |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/testcrc Sat Oct 29 11:40:35 2011 +0700 @@ -0,0 +1,16 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use String::CRC32; + +my @files = @ARGV or print("Usage u fail") && exit(1); + +foreach(@files) { + my $filename = $_; + open(FILE,$filename); + my $crc=crc32(*FILE); + close(FILE); + $crc=sprintf("%X",$crc); + print("$filename: $crc\n"); +}