Mercurial > ec-dotfiles
comparison bin/testcrc @ 129:f18a27a0e8fc
Merge branch.
author | Edho Arief <edho@myconan.net> |
---|---|
date | Sat, 29 Oct 2011 11:40:35 +0700 |
parents | 5bafb912837e |
children |
comparison
equal
deleted
inserted
replaced
121:0c3b473b9af7 | 129:f18a27a0e8fc |
---|---|
1 #!/usr/bin/perl | |
2 | |
3 use strict; | |
4 use warnings; | |
5 use String::CRC32; | |
6 | |
7 my @files = @ARGV or print("Usage u fail") && exit(1); | |
8 | |
9 foreach(@files) { | |
10 my $filename = $_; | |
11 open(FILE,$filename); | |
12 my $crc=crc32(*FILE); | |
13 close(FILE); | |
14 $crc=sprintf("%X",$crc); | |
15 print("$filename: $crc\n"); | |
16 } |